Git Study Notes
Basic Usage:
Git 基本用法以及命令详解:图解Git
Git-Submodule: SubModule - Git 中文文档
Git-Rebase: Rebase - Git 中文文档
分支管理策略:Git分支管理策略
Git远程操作详解:Git远程操作详解
Git - stash用法:Git - stash用法
个人 Git 模拟测试:
如图1:
图1 Git log 图
- 初始化项目,在
master
分支中加入了master-branch.txt
文档。 - 从
master
分支中派生A
分支,在A
分支中创建并提交a.txt
,接着在A
分支中修改master-branch.txt
并提交。 - 再从
A
分支中派生B
分支,在B
分支中创建并提交b.txt
,接着在B
分支中修改master-branch.txt
并提交。 - 切换到
master
分支,执行git merge --no-ff A
,把A
分支合并到master
分支中,成功。 - 切换到
B
分支,执行git rebase master
,执行结果如图2,按照提示执行vim master-branch.txt
解决冲突如图3。 - 冲突解决完之后,执行
git add master-branch.txt
后再执行git rebase --continue
, rebase 完成如图4。
图2
图3
图4
Git 模拟仓库打包在 testgit.zip 中 。
-EOF-