I am using beyond compare to resolve merge conflicts and git extensions to execute git commands. My scenario is something like this. The annotation used is M for Master commits, P for parent branch commits and C for child branch commits.
M1 -- M2 -- M3 -- M4 -- ......... -- M50 ...... M60
\ / /
\ / /
P1 -- P2 -- P3 -- P4 -- P5 /
\ /
\ /
C1 -- C2 -- C3 -- C4 -- C5
Parent branch P5 has been merged to master, all commits in parent branch were squashed except one commit and after merge the parent branch was deleted too. I believe this hasn't affected the child branch. My development in child branch is complete and I want to rebase the child branch with current commit at master(M60). There are merge conflicts because commits in branch P and commits in branch C were developed on same files(DaVinci, C, C#, xml's).
On rebasing C branch on top of M60, I believe I am doing something like this.
M1 -- ... -- M50 -- ..... M60
\
\
C1 -- C2 -- C3 -- C4 -- C5
The problem with my scenario is solving merge conflicts. The C, xml and C# files are not a problem but DaVinci updates many key(some unique value at multiple spots) everytime I save the workspace in DaVinci, so such changes are present in multiple commits in C branch. I am using beyond compare to solve merge conflicts and it appears as if I am spending more time to solve merge conflicts as compared to creating a new branch at M60 and redo the work in DaVinci(as I know what needs to be done now).
Is it possible to resolve merge conflicts on just the final version of the file in the branch instead of resolving conflict commit by commit? (P.S. I donot need commit history)
Please suggest if you have any better idea.
Take a look at
git rebase --onto(git help rebase):Something like this might work for you:
Assuming you are currently on the
C5commit.This will essentially apply the commits
C1troughC5onM60on at the time, and let you resolve any conflicts along the way.When you have done this, then you can merge the new
C5into master, either by fast forwarding or not.