Possible Duplicate:
In git merge conflicts, how do I keep the version that is being merged in?
I have two local git branches on my machine - a branch called "v2" and a branch called "master".
I'd like to merge the "v2" branch into the "master" branch. When I perform the merge, there are a number of conflicts that I must resolve one by one.
The ones I'm having trouble with are where the "master" branch file has additional code that the "v2" branch does not. How do I keep the "master" branch file and not the "v2" branch version of the file?
The options presented to me by Git Tower for these types of conflicts are:
- Mark FILENAME as Manually Resolved
- Resolve by Keeping FILENAME
- Resolve by Deleting FILENAME
- Restore Their Version of FILENAME
- Open in External App
From my understanding, the option to "keep" the file meant keeping the "v2" version (the one being merged in) and "deleting" the file meant not adding the "v2" version (but instead keeping the existing "master" version). When I used this option, though, it actually deleted the file altogether from the repo.
How do I keep the "master" branch file and not the "v2" branch version of the file for these types of conflicts?
EDIT: I'm merging v2 into master while master is checked out and the head branch.