snipt

Ctrl+h for KB shortcuts
#28088

Bash

Set up a tracked remote branch in Git

git branch --track localBranchName origin/remoteBranchName
https://snipt.net/embed/76738e48604e27515ef03a1538761a81/
https://snipt.net/raw/76738e48604e27515ef03a1538761a81/
76738e48604e27515ef03a1538761a81
bash
Bash
1
2014-04-18T08:39:22
True
False
/api/public/snipt/28088/
set-up-a-tracked-remote-branch-in-git
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>git branch --track localBranchName origin/remoteBranchName </span></pre></div> </td></tr></table>
branch, git, versioning
#28087

Bash

List all Git branches (local and remote)

git branch -a
https://snipt.net/embed/65636ff7a35976ad1d9263b861f20c57/
https://snipt.net/raw/65636ff7a35976ad1d9263b861f20c57/
65636ff7a35976ad1d9263b861f20c57
bash
Bash
1
2014-04-18T08:39:18
True
False
/api/public/snipt/28087/
list-all-git-branches-local-and-remote
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>git branch -a </span></pre></div> </td></tr></table>
branch, git, versioning