Diff, Blame and History
"Strength lies in differences, not in similarities" - Stephen Covey
Compare changes within GitKraken diffs. Learn where to access diffs, and how to access file history or file blame.
What is a diff in GitKraken?
A diff shows what was added or removed from a file. Red is for lines where content was removed whereas green is for new lines added.
GitKraken's diff comes included with the following:
- Word diffing
- Syntax highlighting
- File mini-map
- Toggles between Hunk View, Inline View, and Split View
- Arrows to move between change sets
Most importantly, the button allows you to edit this file directly. Learn more about this feature in Editing Files section.
Where can I access the diff?
Access the diff of a file from:
- Staging: Click on a file
- Commit node: With a commit node selected, click on any file
If you have two commits selected, GitKraken shows the difference between the two commits.
Additionally, select multiple commit rows in the graph using Shift Click to show its merged diff:
External diff tools
Configure your preferred external diff tool from Preferences General:
GitKraken currently only supports the following diff tools:
- Beyond Compare
If your diff tool from the list above is installed and is not showing up in the dropdown, then look for an option to install command line tools.
If you would like to use another diff tool, navigate to Preferences General and set the Diff Tool to Git Config Default. Then open your global
.gitconfig file and add these additional lines to use that diff tool. Here are some examples for each operating system:
[diff] tool = meld [difftool "meld"] cmd = open -a Meld --args \"$LOCAL\" \"$REMOTE\"
[diff] tool = meld [difftool "meld"] cmd = meld \"$LOCAL\" \"$REMOTE\"
[diff] tool = meld [difftool "meld"] cmd = \"C:\\Program Files\\Meld\\Meld.exe\" "$LOCAL" "$REMOTE"
File Blame and History
File History and File Blame information display in the same view.
To access either option, click to view the file diff and the options will appear in the upper right.
You may also click on a commit in the graph and then right click a file to access File History or File Blame. File History shows that file's commit history on the left.
File Blame will color code the commit author of each line or hunk.
Use the top toggle button to switch between Diff View, which shows the selected commit's changes to the file, and the File View, which shows the file's state at that commit, including the blame info.