Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Local Branch:</strong></p> <p>A branch on your machine that you can work in and add commits to. You can list these branches with <code>git branch</code>.</p> <p><strong>Local Branch (With Tracking):</strong></p> <p>An ordinary local branch configured to correspond to a remote branch. This has benfits like the ability to <code>git pull</code> and <code>git push</code> without having to specify the repository and branch name. Tracking also causes <code>git status</code> to inform you when your branch is ahead or behind the remote.</p> <p><strong>Remote Branch:</strong></p> <p>Simply a branch on a remote repository—typically on a server such as GitHub etc.</p> <p><strong>Remote Tracking Branch:</strong></p> <p>A local copy of a remote branch. This branch should never be edited. Its purpose is to keep track of the current state of a remote branch. Remote tracking branches can be viewed with <code>git branch -r</code> and typically look something like <code>origin/master</code> (repo name followed by a slash followed by the branch name). Running <code>git fetch</code> will update the remote tracking branches to reflect the state of the corresponding remote branches.</p> <p><code>git branch -avv</code> is my personal favorite for displaying a quick overview of which branches are on my machine, which branches are on the remote, and the latest commit in each. The <code>-a</code> part specifies that all branches should be shown (remote and local). The <code>v</code>'s on the end stand for verbose (it shows the last commit hash and message). Thanks to @Flimm for pointing out that the second <code>v</code> adds info about which local branch is tracking which remote.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload