UCB CS 61B -GIT 基础

本文通过将Git命令比喻为全景摄影的过程,生动地解释了gitinit、gitadd、gitcommit、gitlog、gitshow和gitcheckout的功能。并对比了已跟踪与未跟踪文件的区别,深入浅出地介绍了Git如何保存文件修订历史。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

UCB git 使用教程:
git init: Creates a box in which to permanently store panoramic pictures.
git add: Takes a temporary photo of one thing that can be assembled into a panoramic photo later.
git commit: Assembles all available temporary photos into a panoramic photo. Also destroys all temporary photos.
git log: Lists all the panoramic photos we’ve ever taken.
git show: Looks at what is in a particular panoramic photo.
git checkout: Rearranges files back to how they looked in a given panoramic photo. Does not affect the panormiac photos in your box in any way.

Tracked vs. Untracked Files
Git repos start off not tracking any files. In order to save the revision history of a file, you need to track it. The Git documentation has an excellent section on recording changes. An image from that section is placed here for your convenience:
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值