git常用命令

1.git checkout -b newBranchName  创建分支并切换到新建分支

2.git clone  url 克隆

3.git branch --list 列举当前所有分支

4.git branch --delete branchName 或者 git brach -D branchName 删除某个分支

5.git stash 缓存

6.git stash pop 取出缓存的内容到当前分支

7. git merge branchName 合并该分支到当前分支

8. git reset --hard 回退版本号 (用于撤销merge合并错误)

9. git push -f 强制提交回退后的版本

原文地址:https://www.cnblogs.com/ganmy/p/7738399.html