- Sourcetree Compare Branches Side By Side
- Sourcetree Compare Branch To Master
- Gitkraken Compare 2 Branches
- 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
Condense log messages to a single line to be more readable.
Sourcetree Compare Branches Side By Side
Show files that have changed. This can be extremely useful when combined with
grep. The following will output filenames of all
.png files in the current checked out branch that are not in
Sourcetree Compare Branch To Master
Usually this is accurate enough, but grep could also accept a regular expression of
Gitkraken Compare 2 Branches
Sourcetree Compare Branches Online
- git log documentation