美文网首页
git常用命令

git常用命令

作者: xEndLess | 来源:发表于2022-04-20 23:02 被阅读0次

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

相关文章

网友评论

      本文标题:git常用命令

      本文链接:https://www.haomeiwen.com/subject/isnwertx.html