I know how to merge modification using vimdiff, but, assuming I just know that the entire file is good to keep or to throw away, how do I do that?
I don’t want to open vimdiff for each of them, I change want a command that says ‘keep local’ or ‘keep remote’.
E.G: I got a merge with files marked as changed because somebody opened it under windows, changing the EOL, and then commited. When merging, I want to just keep my own version and discard his.
I’m also interested in the contrary: I screwed up big time and want to accept the remote file, discarding my changes.
You can as well do:
to keep the remote file, and:
to keep local file.
Then
git addthem and everything is done.Edition:
Keep in mind that this is for a
mergescenario. During arebase--theirsrefers to the branch where you’ve been working.