I have a "long lived feature" branch that i have been working for last 2 months. It has 211 commits that i want to squash into single commit before this "long lived feature branch" can be merged with "origin master". When i run "git rebase -i HEAD~210" it kicks off a conflict resolution process of more than 500 conflicts.
What's the best way to squash commits and complete rebase ?
When i do:
git rerere
git rebase -i HEAD~210
# change all "pick" with "squash" and save and exit followed by single
# commit message
It will then present me with 500 or so conflicts to be resolved which is my problem. i.e. is there any way i can get away with it?
There are only 4 files that keep repeating and git rerere
hasnt been of much help.
My other confusion is why i get more than 500 conflicts to be resolved when the commits are 211?
I have been reading on merge vs rebase and the difference seems to be only retaining history or not but in effect processes are quite different. merge works fine but rebase creates a lot of trouble. I have been thinking of creating another feature branch and run git merge --squash
to get rid of commits but my colleagues have already committed on a PR based on my "long lived feature branch" and i would prefer a way to sort out this issue without creating another branch