Tower Help & Support

Checking Out a Branch

In Git, branching isn't optional: you are always working on a certain local branch (the currently active, or "checked out", or "HEAD" branch). To switch your currently active branch, you can use the checkout command and make a different branch HEAD.

Note that you can only check out local branches, not remote ones. To start working on a remote branch, you have to first create your own local copy of it - which you can then check out.

Checkout in Tower

Tower allows you to check out a branch in a couple of ways:

Checkout with Local Modifications

Git won't let you switch branches if you have uncommitted changes in your working copy directory that would conflict with the branch's files you're trying to check out. That's why it's a good habit to only switch branches with a clean working copy. Git's Stash feature was made exactly for this purpose.

However, in case you forget, Tower will automatically offer to stash your current local changes for you.

Checkout of Individual Commits

Although a rather rare case, there might be times when you want to check out a certain commit (that is not the tip of a branch). You can do so in any of Tower's history views: just right-click the commit item and select Check Out <commit hash> from the contextual menu.