Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git conflict while rebase

My workgroup requires me to do a git rebase master on my current branch each time before pushing. However, when there are conflicts I find that I have major problems dealing with them.

I can resolve and update the affected files just fine, but after running git add * and git commit -m "commitmsg" Git refuses to carry out the git rebase --continue. Instead I see the following error message:

No changes - did you forget to use 'git add'?

So I can only run git rebase --abort which undoes everything and sends me back to square one, or git rebase --skip, after which the same conflicts exist again.

Do I misunderstand Git here? What can I do to get out of that infinite loop of resolving the same conflicts over and over again?

EDIT : Running "git rebase --continue" after git add unfortunately produces the same conflicts again.

like image 859
edowy Avatar asked Aug 15 '18 13:08

edowy


Video Answer


1 Answers

I can resolve and update the affected files just fine, but after running git add * and git commit -m "commitmsg" Git refuses to carry out the git rebase --continue. Instead I see the following error message:

No changes - did you forget to use 'git add'?

Don't run git commit here. Just git add the resolved files (personally I avoid * or .), then run git rebase --continue.

like image 164
Chris Avatar answered Oct 16 '22 15:10

Chris