git 冲突解决方法

git merge  \\可以看到有哪些文件冲突,打开文件可以看到哪些地方冲突,更改冲突即可

解决方法:

git reset --merge

注:取消合并

git rebase

注:将当前分支重新设置基线

git diff -w +冲突的文件

注:查看冲突点,修改冲突的文件,达到提交的状态。

git rebase --continue

注:让rebase继续处理

git add

注:追加修改后的文件

git rebase --continue

注:让rebase继续处理,查看是否有其他文件未提交

git commit --amend

注:提交修改后的代码

git push +分支

注:提交到某个分支中

发布了40 篇原创文章 · 获赞 24 · 访问量 15万+

猜你喜欢

转载自blog.csdn.net/llxx1234/article/details/104714848