git官方文档链接
Git - Book (git-scm.com)
遇到问题多看看官方文档。
查看历史提交
git log
查看分支
$ git branch
* master
ota
删除分支
$ git branch -d ota
Deleted branch ota (was 26d379b).
创建分支
git branch ota
切换分支
$ git checkout ota
Switched to branch 'ota'
创建并切换分支
$ git checkout -b sota
Switched to a new branch 'sota'
分支合并
# 先切换到master分支
git checkout master
# 合并分支
git merge ota
网友评论