If more than two persons are working on the same file, it is definitely possible that files are out of sync. With each person changing different locations in the file, It becomes a very tedious task to manually find each and every change and then merge the two files together. Winmerge comes to the rescue. Winmerge is an OpenSource solution for file comparison and merging, for windows. It is a very easy to use tool allowing you to merge or compare two files. The interface is very intuitive, with the GUI opening both the versions of same file in two windows. The differences between the files can be seen in different color making it easy to spot them.
The winmerge latest version .exe file for windows is available at http://www.winmerge.org. Once you download it, its just a double click install.
Starting with winmerge is a breeze. You can select a file and right click and select winmerge to open it with winmerge, this opens the winmerge window with the address of first file typed in the address bar named left, and the right address bar is empty. Here you have to browse and select the next file that you want to compare with the first file. Once the second file opens you can browse both the files and the differences in the files are show in yellow colour by default, although you can change this to any color you wish. There are few icons on the top that are very useful especially in case of bigger files. The “Next Difference” button allows you to sequentially go to each and every difference found in the file, thus eliminating the chance of missing a difference while scrolling down the file. The “Previous Difference” button allows browsing upwards to look for differences rather than going down as for “Next Difference” button. Then there is the “First Difference”, “Current Difference” and “Last Difference”, which I think are self explanatory. This was to compare the files. Now we will see how to merge them. Suppose you see one difference that you want to merge, so you can use the “Copy Right” or the “Copy Left” button depending on where you want to copy. Then there is copy and advance button also which will copy your changes and move to next difference in one shot. If you want to completely move the content from one side to another, you can simply use the “All right” or “All left” buttons. You can view the difference separately in the difference pane and you location in the file in the location pane.
This is all about file comparison and merging using winmerge, but while using winmerge you have to be very careful about what differences you are copying to the other file, since one click can cost you dearly if incorrect changes are taken to the file.
Using winmerge you can compare the whole directory structure also. While opening the file browse to the directory instead of file, and the list of files open in both the directories. In front of each file there is a remark telling whether the files are same or not. Thus you can decide which files to open for comparison.