It opens a GUI that steps you through each conflict, and you get to choose how to merge.
Sometimes it requires a bit of hand editing afterwards, but usually it's enough by itself.
For example, if a co-worker is making a disruptive series of commits over the course of a one-week period, you may choose to merge/rebase on that co-workers branch once or twice each day during that week.
That way, if you do find merge/rebase conflicts, you can solve them more quickly than if you wait a few weeks to merge everything together in one big lump. Merging can feel overwhelming, especially when there are a lot of conflicting files and the conflict markers cover hundreds of lines.
(Knowing how to fix a conflict is very different; you need to be aware of what other people are working on.
If you're confused, it's probably best to just call that person into your room so they can see what you're looking at.) If the conflict is longer, then I will cut and paste each of the three sections into three separate files, such as "mine", "common" and "theirs".
I'm usually more successful looking at the conflict markers in a text editor and using git log as a supplement.
Here are a few tips: The best thing I have found is to use the "diff3" merge conflict style: The middle section is what the common ancestor looked like.
Running I don't understand why this answer received so many upvotes, it isn't really very helpful as it only contains this one command and absolutely no explanation how to use it.
As others said, it opened a vimdiff and even if I know how to use vim (switch the windows at least or close them) I don't even know what each window represent neither how to compare or accept the changes.
Then it's easy to see that the content you've updated isn't in the repository and needs to be added.
This way of thinking also explains why Git doesn't track empty folders: Although they are technically files, there isn't any content to track.content is there, conflict occurs because there 2 version of content. And it does not work (git add, git commit) if you want commit only that one file after conflict was resolved ("fatal: cannot do a partial commit during a merge.")Yes, technically, this answers the question which as asked, but is not a usable answer, in my opinion, sorry.
It's nice to know there is such a command, but with no explanation of how to use it or install other 3rd tools, it's useless answer Guys, "ours" and "theirs" is relative to whether or not you are merging or rebasing.