Sourcetree Compare Branches

  1. Sourcetree Compare Branches Side By Side
  2. Sourcetree Compare Branch To Master
  3. Gitkraken Compare 2 Branches
  4. Sourcetree Compare Branches Online

The majority of the time I manage Git repositories in SourceTree because wrangling lots of Git projects on the command line can get hairy. The visibility of statuses across mutiple local repositories that a GUI like SourceTree provides is not available on the command line. However, some things are often simpler and quicker on the command line than in GUI Git clients. One of those things is comparing branches.

After you set it as an external diff tool in sourcetree, you select both files you want to compare using CTRL and after that you press CTRL+D. As a result, Beyond Compare will be launched with both files ready to be compared. Adding the amend option you will replace the tip of the current branch by creating a new commit. For doing this in Sourcetree you need select the Commit Options in the right top of the commit input box and select the option Amend last commit. Show changes between commits, commit and working tree, etc.

This will show any commits that happened in the <until> branch that are not in <since>. Often I will use this command to compare a feature branch with a master branch before merging, just to make sure I’m not missing anything. Note that <until> is optional and if omitted will default to the current checked out branch.

This also works with tags.

This is useful as a pre deployment task to check what’s about to be deployed, create changelogs for a new tag, etc. Open phpmyadmin xampp. git shortlog can also be useful for changelogs.

Useful flags for git log


Condense log messages to a single line to be more readable.


Sourcetree diffCompare

Sourcetree Compare Branches Side By Side

Gitkraken compare 2 branches

Show files that have changed. This can be extremely useful when combined with <since>. and grep. The following will output filenames of all .png files in the current checked out branch that are not in master.

Sourcetree Compare Branch To Master

Usually this is accurate enough, but grep could also accept a regular expression of -e '.*.pngb'

Gitkraken Compare 2 Branches

Sourcetree compare branches list



Sourcetree Compare Branches Online

  • git log documentation