Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As mentioned in <a href="https://stackoverflow.com/users/1541707/yoshua-wuyts">Yoshua Wuyts</a>' <a href="https://stackoverflow.com/a/29080220/6309">answer</a>, using <a href="http://git-scm.com/docs/git-branch" rel="noreferrer"><code>git branch</code></a>:</p> <pre><code>git branch --unset-upstream </code></pre> <h3>Other options:</h3> <p>You don't have to delete your local branch.</p> <p>Simply delete your remote tracking branch:</p> <pre><code>git branch -d -r origin/&lt;remote branch name&gt; </code></pre> <p>(This <a href="https://stackoverflow.com/questions/3046436/how-do-you-stop-tracking-a-remote-branch-in-git/3046478?noredirect=1#comment13741233_3046478">will <em>not</em> delete the branch on the remote repo</a>!)</p> <p>See "<a href="https://stackoverflow.com/questions/1070496/having-a-hard-time-understanding-git-fetch">Having a hard time understanding git-fetch</a>"</p> <blockquote> <p>there's no such concept of local tracking branches, only remote tracking branches.<br> So <code>origin/master</code> is a remote tracking branch for <code>master</code> in the <code>origin</code> repo</p> </blockquote> <p>As mentioned in <a href="https://stackoverflow.com/users/399738/dobes-vandermeer">Dobes Vandermeer</a>'s <a href="https://stackoverflow.com/a/3376017/6309">answer</a>, you also need to reset the configuration associated to the <em>local</em> branch:</p> <pre><code>git config --unset branch.&lt;branch&gt;.remote git config --unset branch.&lt;branch&gt;.merge </code></pre> <blockquote> <p>Remove the upstream information for <code>&lt;branchname&gt;</code>.<br> If no branch is specified it defaults to the current branch.</p> </blockquote> <p>(git 1.8+, Oct. 2012, <a href="https://github.com/git/git/commit/b84869ef14081b298a4ab825219221ccfcb2a3ba" rel="noreferrer">commit b84869e</a> by <a href="https://github.com/carlosmn" rel="noreferrer">Carlos Martín Nieto (<code>carlosmn</code>)</a>)</p> <p>That will make any push/pull completely unaware of <code>origin/&lt;remote branch name&gt;</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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