Note that there are some explanatory texts on larger screens.

plurals
  1. PORemote branch not showing up in "git branch -r"
    primarykey
    data
    text
    <p>I have been pushing to a remote bitbucket repo and recently a colleague has pushed a new branch he created to the same repo. </p> <p>I'm trying to fetch the changes he uploaded. </p> <pre><code> $ git branch -a * master localbranch1 localbranch2 remotes/origin/master </code></pre> <blockquote> <p>$ git branch -r<br> origin/master</p> </blockquote> <p>In the web ui for bitbucket I can see the branch he has made. Any help/advice/direction would be most appreciated. Thanks.</p> <p>Any futher info you need just ask.</p> <p><strong>EDIT 1</strong></p> <pre><code>$ git fetch bitbucket Password for 'https://xxxxx@bitbucket.org': From https://bitbucket.org/user/repo * branch HEAD -&gt; FETCH_HEAD </code></pre> <p>If the branch he created is called <strong>new_branch_b</strong> should I be expecting to see:</p> <pre><code>$ git branch -r origin/master origin/new_branch_b </code></pre> <p><strong>EDIT 2</strong></p> <pre><code>$ git remote update Fetching bitbucket Password for 'https://xxxxx@bitbucket.org': From https://bitbucket.org/user/repo * branch HEAD -&gt; FETCH_HEAD $ git branch -r origin/master </code></pre> <p><strong>EDIT 3</strong></p> <pre><code>[remote "bitbucket"] url = https://user@bitbucket.org/user/repo.git </code></pre> <p>I called the remote bitbucket rather than origin (at least that's what I recall, I set it up a while ago)</p> <p><strong>EDIT 4</strong></p> <p>I updated the bitbucket remote config as per kan's answer.</p> <blockquote> <p>$ git config -e</p> </blockquote> <pre><code>[remote "bitbucket"] url = https://user@bitbucket.org/user/repo.git fetch = +refs/heads/*:refs/remotes/bitbucket/* </code></pre> <p>For most people it will be called origin</p> <pre><code>[remote "origin"] url = https://user@bitbucket.org/user/repo.git fetch = +refs/heads/*:refs/remotes/origin/* </code></pre> <p>Afterwards </p> <pre><code>$ git remote update Fetching bitbucket Password for 'https://user@bitbucket.org': remote: Counting objects: 48, done. remote: Compressing objects: 100% (32/32), done. remote: Total 35 (delta 21), reused 0 (delta 0) Unpacking objects: 100% (35/35), done. From https://bitbucket.org/user/repo * [new branch] branch_name1 -&gt; origin/branch_name1 * [new branch] branch_name2 -&gt; origin/branch_name2 </code></pre> <p>.... and so on.</p> <p>I think <code>git fetch origin</code> would also work for <code>git remote update</code></p> <p>Thanks to everyone who helped me with this problem. </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.
 

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