This is what I am doing:
1) I cut a new branch from master. 2) Make some changes and created pull request. Till now commit history is
02 second commit
01 first commit
3) During code review, reviewer asked me to replace tabs with spaces in xmls. I did it and push those changes.
03 Tabs removed in third commit
02 second commit
01 first commit
4) Pull request is approved and goes to merge to master pipeline.
5) I keep rebasing with master until my M2M request is in queue which works fine.
6) During this parent pom version is updated.
I update parent version and push those changes. My push fails for a file where I updated parent version. The error message asks me to do git pull first
Auto-merging pom.xml
CONFLICT (add/add): Merge conflict in pom.xml
7) I resolve conflict and push those changes. Push is successful.
Now I do rebase with master and start getting rebase conflicts for all the xmls where I replaced tabs with spaces.
CONFLICT (content): Merge conflict in pom.xml
Patch failed at 01 first commit.
8) I resolve them by taking changes from origin/HEAD
then git rebase --continue
and then git rebase --skip
.
9) Then I do rebase with master which shows upto date.
10) I do pull mybranch & I get a commit message Merge branch mybranch to mybranch. I enter commit message and then it shows merge made by 'recursive strategy'.
11) I try to do git push origin mybranch which is successful.
12) At this point my git commit history is like
13 Merge mybranch with mybranch
12 child pom updated with parent version
11 Tabs removed in third commit
10 second commit
09 first commit
08 Merge (grayed)
07 child pom updated with parent version
06 Tabs removed in third commit
05 second commit
04 first commit
03 Tabs removed in third commit
02 second commit
01 first commit
13) Then I do git pull --rebase
origin master and start getting merge conflicts again like previous. The rebase issues just keep on increasing.
This just goes on and I am stuck in a loop. Please help me to get rid of these issues with some explanation on what I am doing wrong. Also why do I keep getting space/tab issues for previous commit during rebase?