Which GIT Branch?

Committed to a WRONG branch! 😱

Working on a wrong branch is one of the occasional mistakes if your project has multiple branches. I had made this mistake several times before I created Which Git Branch! It shows you where your project is: the working directory and the branch which you checked out.


On Windows, you can use a command-line version of git. Or, the SourceTree has git command-line tools. Type the following in the Command Prompt window to check if they exist.

dir %USERPROFILE%\AppData\Local\Atlassian\SourceTree\git_local\bin

Click the Setting toolbar button in the main window of Which Git Branch to open the Settings window. In that window, you can set the path of your git command-line tool. Use the Test button to test if there is any problem with your settings.

On Mac, you can use the built-in git command-line tool or your custom installation. Use type command in the Terminal app to look for the path of your git installation.

type git
> git is hashed (/usr/bin/git)