TortoiseGitMerge Manual

Chapter 1. Introduction

Overview

TortoiseGitMerge is a free/open-source application. It lets you see differences in text files, merge those changes and even review and apply unified diff files, often called patches.

While working on text files, e.g. source files in your favourite programming language, or html/xml files for your documentation or website, you will often have a situation where you need to compare different versions of those files. Sometimes you get a different version from someone else, sometimes you just want to see the changes you've made.

If you're working with a version control system (e.g. Git) then you sometimes get conflicts when you update your working copy. This happens if someone else changed the same parts of the file you're currently working on as you did. Then you have to resolve those conflicts manually. This is where TortoiseGitMerge can help you.

The following diagram shows you the relationships between the files involved in a conflict:

Figure 1.1. File Conflict

File Conflict

A conflict can also occur if you try to apply an outdated patch file. In such cases, without TortoiseGitMerge, you would either have to ask the person you got that patch file from for a current version or try to apply that patch file manually.

But now with TortoiseGitMerge this isn't necessary anymore - at least not if you're working with a version control system like Git. TortoiseGitMerge parses the patch file for the revision/version the patch was created for and automatically tries to fetch that specific version from your source-control. Then it applies the patch and lets you review both your changes to the file, and theirs. Then you can decide which changes you want to keep.