您的位置:首页 > 其它

git 冲突解决技巧

2017-09-10 18:39 330 查看
提交版本后出现冲突
如果冲突在同一行,git pull之后再提交就解决了
如果冲突不在同一行 git pull之后也会有冲突
git pull 之后有冲突:
$ git pull
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From g:/software/repository/git/itheima26
   50db030..a04027a  master     -> origin/master
Auto-merging readme.txt
CONFLICT (content): Merge conflict in readme.txt
Automatic merge failed; fix conflicts and then commit the result.
解决方法:
1.git mergetool
调用上面命令之后会提示你输入编辑方法,输入:beyond compare 进入编辑器.
2.编辑完之后.调用git commit -a 把当前目录中所有都提交到本地库中.
3.git push origin master 提交到远程库中.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: