Tutorial: Using WinMerge to Merge Code Changes from Two Project Folders

In this tutorial, I will walk you through the step-by-step process of using WinMerge, a highly reliable and open-source tool, to compare and merge differences between two code version project folders. Let’s begin!

Step 1: Download and Install WinMerge

First things first, you’ll need to download the software onto your computer.

  1. Go to the official WinMerge website: https://winmerge.org.
  2. Click on the “Download Now” button on the main page. This will direct you to the download page.
  3. Here, you’ll see multiple versions available for download. Unless you need a specific version for compatibility reasons, it’s generally best to go for the latest stable release. Click on the download link for the latest version.
  4. After the download is complete, run the installer. It will guide you through the installation process. The default options are suitable for most users.

Step 2: Open WinMerge

Once you’ve installed WinMerge, it’s time to open it.

  1. Find WinMerge in your Start menu or desktop, and open the program.
  2. Once you’re inside the program, you should see a clean interface with a menu at the top, which contains the primary functions of the program.

Step 3: Select Directories to Compare

The next step is to choose the two project folders that you want to compare.

  1. In the top menu, go to File > Open.
  2. This will open a dialog box where you can select the directories or files you want to compare.
  3. In the “Left:” field, click on the folder icon to navigate to and select your first project folder, as recommendation, you should select the newest version project folder first to see the code differences more easily.
  4. Do the same for the “Right:” field, but this time select your second project folder or your older version project folder.
  5. Once both directories are selected, click the “OK” button.

Step 4: Compare the Directories

After selecting your directories, WinMerge will start comparing the contents of both folders.

  1. In the main WinMerge window, you’ll see a side-by-side view of your two directories. Files and subdirectories are shown in pairs, with any differences being highlighted.
  2. You can click on a file pair to see a line-by-line comparison of those files in a lower panel. Any differences within the files will be highlighted.

Step 5: Merge the Differences

With the differences identified, it’s time to start merging.

  1. Select the file pair you want to start merging.
  2. In the line-by-line comparison, you can see exactly what the differences are. You have the option to either copy the changes from the left file to the right or from the right to the left.
  3. To merge changes, right-click on the difference you want to merge. A context menu will pop up.
  4. Click on “Copy to Right” if you want to apply the changes from the left file to the right file. Click on “Copy to Left” if you want to apply the changes from the right file to the left file.
  5. Repeat the process for each difference you want to merge.
  6. Once you’re done merging the changes in a file, you can save the file by going to File > Save. You can also press Ctrl + S as a shortcut.

Congratulations! You’ve successfully merged changes between two code version project folders using WinMerge. Remember to always double-check your merges to ensure everything is as expected. WinMerge is a powerful tool that makes the merging process easier, but it’s always good to have a human eye review the changes too.

©Lovatto Studio 2023                                            Privacy Policy | Terms And Conditions


Log in with your credentials