Compare changes within GitKraken Client diffs. Learn where to access diffs, and how to access file history or file blame.
What is a diff in GitKraken Client?
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 Client’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 Client shows the difference between the two commits.
Additionally, select multiple commit rows in the graph using Shift Click to show its merged diff:
Hunk view will show the diff as blocks, without the context of the rest of the file.
Inline view will show the diff within the context of the entire file.
Split view will show a side by side diff comparing how the file looked before (left), and how it looks after the change (right). Note, you may select deleted lines with your mouse from split view.
External diff tools
Configure your preferred external diff tool from Preferences General:
GitKraken Client 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"
Diff multiple commits
Use the Shift or Cmd/Ctrl key to select multiple commits in the graph.
This will produced a combined diff, which lists all files that were added, modified, renamed or deleted between the selected commits in the Commit Panel.
Note: Are you looking to diff branches? Consider using the Cmd/Ctrl key to select the head commits of each branch.
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.