Compdigitec Labs

« | Home | »

Git refuses to discover new remote branches

By admin | January 23, 2021

In addition to the excellent suggestions at https://stackoverflow.com/questions/1783405/how-do-i-check-out-a-remote-git-branch, take a look in .git/config and make sure fetch is specified to only fetch the master branch:

[remote "origin"]
  url = git@github.com:example/coolproject.git
  fetch = +refs/heads/master:refs/remotes/origin/master # bad

You’ll want to change the fetch line to fetch all branches instead:

[remote "origin"]
  url = git@github.com:example/coolproject.git
  fetch = +refs/heads/*:refs/remotes/origin/*

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: Linux | 8 Comments »

8 Responses to “Git refuses to discover new remote branches”

  1. Exology Says:
    July 4th, 2024 at 18:50

    … [Trackback]

    […] Here you will find 10088 more Information on that Topic: compdigitec.com/labs/2021/01/23/git-refuses-to-discover-new-remote-branches/ […]

  2. รับจำนำรถใกล้ฉัน Says:
    July 12th, 2024 at 22:33

    … [Trackback]

    […] Read More Info here to that Topic: compdigitec.com/labs/2021/01/23/git-refuses-to-discover-new-remote-branches/ […]

  3. pglike Says:
    July 17th, 2024 at 21:23

    … [Trackback]

    […] There you can find 16162 more Info on that Topic: compdigitec.com/labs/2021/01/23/git-refuses-to-discover-new-remote-branches/ […]

  4. รับสร้างบ้านเชียงใหม่ Says:
    September 20th, 2024 at 19:57

    … [Trackback]

    […] Read More Information here to that Topic: compdigitec.com/labs/2021/01/23/git-refuses-to-discover-new-remote-branches/ […]

  5. Buy SAINT® 5.56, M-LOK® AR-15 RIFLE, PIC GAS BLOCK  Online Says:
    September 20th, 2024 at 23:40

    … [Trackback]

    […] Find More to that Topic: compdigitec.com/labs/2021/01/23/git-refuses-to-discover-new-remote-branches/ […]

  6. เปรียบเทียบเว็บหวยกันระหว่าง Uwin กับ LSM99 เจ้าไหนดี Says:
    September 22nd, 2024 at 07:11

    … [Trackback]

    […] Info on that Topic: compdigitec.com/labs/2021/01/23/git-refuses-to-discover-new-remote-branches/ […]

  7. 온라인카지노 Says:
    September 30th, 2024 at 05:20

    … [Trackback]

    […] Info to that Topic: compdigitec.com/labs/2021/01/23/git-refuses-to-discover-new-remote-branches/ […]

  8. cartel carts Says:
    October 1st, 2024 at 22:06

    … [Trackback]

    […] Info to that Topic: compdigitec.com/labs/2021/01/23/git-refuses-to-discover-new-remote-branches/ […]

Comments