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 提交到远程库中.
如果冲突在同一行,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 提交到远程库中.
相关文章推荐
- Git技巧之解决git merge的合并冲突(非树冲突)
- 基于Git的常用撤销技巧与解决冲突方法(推荐)
- git 解决冲突技巧
- git冲突解决办法
- 解决因为本地代码和远程代码冲突,导致git pull无法拉取远程代码的问题
- eclipse 中git解决冲突
- 有没有人告诉我 如果使用GIT时,两个人同时修改了同一文件 这种冲突一般有哪几种解决方式?
- 10_Eclipse中演示Git冲突的解决
- 多人开发时Git下冲突的产生和解决
- git eclipse 冲突解决
- Git错误non-fast-forward后的冲突解决
- 2016/01/13开始学习git:分支管理:解决冲突
- Eclipse中用git解决冲突----避免每次重新拉代码
- git冲突的解决
- git冲突解决方法
- Git错误non-fast-forward后的冲突解决
- Git错误non-fast-forward后的冲突解决
- Git 配置仓库链接 和一些冲突解决
- Git错误non-fast-forward后的冲突解决
- git merge git pull时候遇到冲突解决办法git stash