A common workflow in Git is to use feature branches, where work is focused on one specific task. If you didn’t closely follow all commits in a particular feature branch, it is likely faster to review all changes to that branch in one go. It is also good practice to review a finished feature in its feature branch before merging it back to the main line. Or even check all changes of a release before publishing it, as David Smith recently described on his blog.
This is where the Changeset functionality in Kaleidoscope comes in handy. It provides you with a list with all the file that have been changed. You can filter that list down, for example using a set of file extensions, to only source code to review while ignoring other assets. Keyboard shortcuts enable you to quickly jump between files and from change to change. And of course all Kaleidoscope for text files and images is available for each file, so you can toggle the view more or quickly search within text, just to name two examples
How to open a Changeset in Kaleidoscope
Opening a Changeset in Kaleidoscope needs to be triggered from your git environment. Git needs to tell Kaleidoscope what to compare. Below you’ll find an example for command line use and a short clip where we use Tower. Comparing branches should be possible in most git clients.
Command Line Use
The examples below assume that you have a branch called main that serves for ongoing development. In some environments, this may also be called develop or master.
To compare the changes made in a feature branch against the main branch when you are currently on the main branch, run:
git difftool ...branch-name
And when you are on the feature branch:
git difftool main...
In git speak this is called a three-dot git diff, where you can specify a branch name, tag, or hash before and after three dots.
git difftool takes the same arguments as
git diff, see the man page for more information.
Tower – Comparing branches
Select the two branches from the sidebar by ⌘-clicking two entries. Bring up the contextual menu and select Compare <entry> with <entry2>….
Note: For this to work, Kaleidoscope needs to be set as the default tool for
git difftool. Head to the menu Kaleidoscope > Integration… > Git to set this up via a single button click.
In a previous blog post about the Tower Git client, we show various ways you can use to start a code comparison in Kaleidoscope from Tower.