美文网首页
Git 常用指令

Git 常用指令

作者: 黑小柴 | 来源:发表于2020-01-20 17:04 被阅读0次

git pull --rebase

git reset --hard origin/master(如果本地版本领先于remote但不想要,将本地版本回滚为remote)
If your local changes are bad then just remove them or reset your local master to the state on remote

git push -u origin master
上面命令将本地的master分支推送到origin主机,同时指定origin为默认主机,后面就可以不加任何参数使用git push了。

git push origin
默认push当前正在使用的的分支到远程

merge时,master和分支各自都分别有新的提交时,就会产生冲突,有冲突的那个文件不会被merge,需要自己手动修改后进行add。

相关文章

网友评论

      本文标题:Git 常用指令

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