File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,15 @@ git config --global core.autocrlf input # Linux/macOS 用户:提交时转换
5353
5454## 4. Git命令使用过程总结
5555
56- (在此处总结使用Git命令的过程,包括但不限于以下操作:
5756
58- ### 常用命令
57+ 本次作业使用 Git 的操作过程:
58+ 1 . 使用 clone 命令将仓库下载到本地:
` git clone [email protected] :tmacychen/github101.git ` 59+ 2 . 进入 lesson2 目录下,修改作业文件,完成作业内容
60+ 3 . 使用 add 命令添加本次作业修改到暂存区: ` git add assignments/lesson2/tmacychen.md `
61+ 4 . 使用 commit 命令添加一次提交的 log: ` git commmit -m "finish lesson2 homework" `
62+ 5 . 使用 push 命令提交:` git push `
63+
64+ ### Git 常用命令
5965- git clone: 克隆远程仓库到本地
6066- git add: 添加文件到暂存区
6167- git commit: 提交更改到本地仓库
@@ -64,7 +70,7 @@ git config --global core.autocrlf input # Linux/macOS 用户:提交时转换
6470- git tag : 创建一个快照,将当前状态保存在 tag 中,一般用于版本发布打标签。
6571- git log :查看当前分支的变更历史记录,可以分页查看
6672
67- ### 分支管理
73+ #### 分支管理
6874
6975- git branch :查看当前本地分支
7076- git branch -a : 查看分支,包括本地分支与远程分支
@@ -75,7 +81,7 @@ git config --global core.autocrlf input # Linux/macOS 用户:提交时转换
7581- git rebase : 重新梳理分支的变更记录,比如合并某些 commit,删除某些 commit等。
7682- git cherry-pick:将某个或某些commit 从一个分支中挑出来,合入另一个分支。
7783
78- ### 文件修改与恢复
84+ #### 文件修改与恢复
7985
8086- git restore :恢复某个文件,不改变提交历史,仅操作工作区域缓存区
8187- git reset : 回退提交历史,移动分支指针来修改提交记录。
You can’t perform that action at this time.
0 commit comments