Using Git Integration with Kaleidoscope 2

By default, Git only shows unstaged changes when you use git difftool. If there are no unstaged changes, Git will appear to do nothing when git difftool is run.

Note: git difftool takes the same arguments as git diff, see the man page for more information.

Examples

  • git difftool - view unstaged changes

git diff [--options] [--] [<path>…] This form is to view the changes you made relative to the index (staging area for the next commit). In other words, the differences are what you could tell git to further add to the index but you still haven't. You can stage these changes by using git-add(1).

  • git difftool --cached - view staged, but not committed, changes

git diff [--options] --cached [<commit>] [--] [<path>…] This form is to view the changes you staged for the next commit relative to the named <commit>. Typically you would want comparison with the latest commit, so if you do not give <commit>, it defaults to HEAD. If HEAD does not exist (e.g. unborned branches) and <commit> is not given, it shows all staged changes. --staged is a synonym of --cached.

  • git difftool HEAD - view both staged and unstaged changes compared to latest commit
  • git difftool {branch name} - view both staged and unstaged changes compared to named branch

git diff [--options] <commit> [--] [<path>…] This form is to view the changes you have in your working tree relative to the named <commit>. You can use HEAD to compare it with the latest commit, or a branch name to compare with the tip of a different branch.