git常用命令

2022-04-20  本文已影响0人  xEndLess

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
上一篇 下一篇

猜你喜欢

热点阅读