git 提交代码时,遇到抵触时,会呈现分支那里正在变基问题

因为在一个分支上协同开发,我在开发前pull了一下分支,那时候曾经有一部分的代码了,因为我和另一个小伙伴的代码有一部分是反复的,然而他的有问题,所以我须要批改,就改了他的一部分代码,而后我须要提交了。

git add .git commit -m 'xxxxxxxx'

这时候须要对原有的分支进行pull一下,

git pull

pull之后的提示信息,因为他有提交,并且我在他之后提交的地位做过批改,而后pull的时候会和已有的提交进行笼罩导致抵触
须要手动合并文件解决,
解决抵触后应用git add示意抵触曾经解决,
git rebase --continue示意持续下一个抵触,
git rebase --skip示意跳过以后抵触,
git rebase --abort示意退出rebase模式,
回到运行git rebase master命令之前的状态。

Resolve all conflicts manually, mark them as resolved with“git add/rm <conflicted_files>”, then run “git rebase --continue”.You can instead skip this commit: run “git rebase --skip”.To abort and get back to the state before “git rebase”, run “git rebase --abort”.

解决完抵触之后,我保留上传始终重复,发现有变基。。
我应用了git rebase --abort,想把变基去掉。然而应用之后。能够看他给出的提示信息。

“git add/rm <conflicted_files>”, then run “git rebase --continue”.

最初查找材料应用

git add .(只有有批改都须要git add . 或者git add 具体的文件)git rebase --continue( git rebase --continue 就相当于 git commit)依照提醒输出qa:enter,具体看提醒git push 就能够提交代码了

————————————————
原文链接:https://blog.csdn.net/weixin_...