Git Changesets
Using git difftool
, Kaleidoscope can compare arbitrary changes made in Git. Uses are inspecting single commits, branches, tags, comparing multiple commits, and many more.
See The Changeset Window for a comprehensive description of its functionality.
There are numerous ways to open changesets, both from within Kaleidoscope as well as other apps and the git command line.
Opening Changesets in Kaleidoscope
Via the Repository View
See Git Repositories for more information about how to interact with Repositories and Changesets inside Kaleidoscope.
Via the File History
When looking at an entry in the File History, there are two commands to either open the changeset for that commit or the changeset between that commit and the one of the File History entry below.
Via Commit Details
When inspecting the details of a commit in Kaleidoscope, e.g. in a Recent Documents list, you will likely find a “Open Changeset“ button. Clicking it will open all changes of that commit in a new window.
Working with git difftool
Many Git GUI clients offer convenient ways to compare commits using an external tool such as Kaleidoscope. Check out the documentation of your tool of choice. If you are missing that functionality, contact the vendor and have them talk to us for integration options. We are happy to provide developers with information on how to integrate with Kaleidoscope.
Setup
While some clients may not even need both, please go ahead and setup the ksdiff command line tool and the git integration using the Kaleidoscope Integration window:
Select Kaleidoscope > Integration… from the menubar.
Select ksdiff in the sidebar.
Follow instructions to ensure ksdiff is installed.
Select Git in the sidebar.
Ensure Git command line integration is installed.
Command Line Usage
Graphical Git clients typically rely on functionality built into Git itself to compare changes in Git repositories, in particular the git difftool
command.
Compare two arbitrary commits
This assumes you know the hashes of both commits you want to compare. You can find those out via git log
or any other way. Assuming you did follow the steps above you can just enter:
git difftool <HASH1> <HASH2>
Compare uncommitted changes in the current working directory
Use this command to show the current changes that have not yet been committed to the repository. This is a very useful way to double-check changes before committing and even cleaning up changes:
git difftool HEAD
Compare two branches
You may want to double-check all changes made in a feature branch before merging it back to the main/develop branch of your repository. Assuming your main branch is named develop
and your feature branch is named feature/one
, use this command:
git difftool develop feature/one
Branches, pull requests,…
Many more useful commands exist to compare specific tags or inspect pull requests before merging.