`

git merge后,如何回退?

    博客分类:
  • git
git 
阅读更多
1、使用git clone 一个远程分支到本地

    git clone git@....  或者 git clone git@.... 别名

2、修改了本地分支后,需要查看那些文件被修改

   git status
3、查看远程服务器中的所有分支

   git branch -a
4、将本地修改后的文件加入到版本控制中

   git add .  或者 git add 单个文件路径

5、将本地文件提交到远程分支

   git commit -m "描述信息"

6、推送本地更改到远程  git push

7、拉去远程分支的更新  git pull

8、查看提交记录 git reflog  或者 git log

9、回退merge请求 git revert headNum

10、从本地分支在新建一个分支并切换到该分支 git checkout -b branchName 

11、将本地新建的分支推送到远程服务器 git push origin 本地分支名:远程分支名

12、删除远程分支 git branch -d -r 远程分支  删除本地分支 git branch -d 本地分支


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics