views:

443

answers:

6

Are there command line merge tools for windows? I'm thinking in terms of tools that can be used in conjunction with other tools (e.g. git, unison) to resolve conflicts.

Actually, it doesn't need to strictly be command-line based, as long as it "cooperate" with other command line tools (as I mentioned, git for example), then it's fine.

A: 

Is that tool similar to Beyond compare, or windeff etc in windows?

Haranadh
I don't know, you tell me :)
hasen j
A: 

I've used KDiff3 and I've heard good things about WinMerge. I'm not sure what command line cooperation you're looking for; I use these tools in conjunction with TortoiseSVN without any problems.

Jamie Ide
I have winmerge, I don't know if I can make it work with git though. VonC says you can't.
hasen j
+1  A: 

The problem with graphical merge tools (like WinMerge) is that Git, for instance, waits the exit code (or the validation of the user after the exit of the diff tool), implying that the user first close the external diff tool.

And a pure command-line diff tool is not very practical to use for merge purpose...

VonC
+2  A: 

Araxis Merge is a great diff/merge tool for Windows and Mac, and they also offer a command-line and a .NET API version of their diff/merge engine.

Araxis Merge is the only tool I know of at this time that can compare and merge two files with differing text encoding, e.g. a UTF-8 and an ANSI file side-by-side.

Marc

marc_s
A: 

Beyond Compare 3 Pro supports command line merges and can handle them both interactively or non-interactively (automerging without a window). It sets the exit code, so it can be integrated with other tools, and it does handle merging files with different encodings.

Craig Peterson
A: 

Eclipse is really cool tool to compare directories and files

based2