More on git difftool and git mergetool
Kaleidoscope directly integrates with Git to provide access to new and recently opened changesets.
There is also integration with the Git version control system through git difftool and git mergetool. This mechanism is being used by many Git apps to integrate with Kaleidoscope.
To set up this integration, open the Integration window:
Go to Main Menu > Kaleidoscope > Integration…
In the Integration window, you can choose between two options: either set Kaleidoscope as the default diff and merge tool, or just set it up as an alternative tool for ad hoc usage.
If you choose to make Kaleidoscope the default, you can show comparisons in Kaleidoscope by invoking
git difftool
.If you choose to make Kaleidoscope an alternative tool, you can show comparisons in Kaleidoscope by running
git difftool -y -t Kaleidoscope
.
Adding -y
makes sure you don't need to press return every time ksdiff has opened a tab in Kaleidoscope.
Once you have installed the integration, you can try out how it works:
Change a few files in your repository.
Run
git difftool
orgit difftool -y -t Kaleidoscope
to see the changes in Kaleidoscope.
You can try other variations: git difftool
accepts the same arguments as git diff
, so you can for instance run git difftool HEAD^
to see the differences with the previous revision, or git difftool branch_name
to show the differences between the current checkout and the branch branch_name
. If you'd like to learn about more options, you can take a look at the git diff manpage.
How The Integration Works
The Git integration works by setting up a custom difftool in the global git config. If you decide to use Kaleidoscope as the default diff tool (which is the default option), then it will also set Kaleidoscope as the default tool and disable prompting when a diff has finished. If you would like to set up Git integration yourself instead of doing it through the Integration window, you can add the following to your git config:
Much like the diff integration, Kaleidoscope's Git integration works by setting up a custom mergetool in the global git config. If you decide to use Kaleidoscope as the default merge tool (which is the default option), then it will also set Kaleidoscope as the default tool and disable prompting when a diff has finished. If you would like to set up Git integration yourself instead of doing it through the Integration window, you can add the following to your git config: