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 | 13 Comments »

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

  1. relx Says:
    February 7th, 2022 at 20:45

    … [Trackback]

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

  2. DevOps future trends Says:
    March 29th, 2022 at 12:24

    … [Trackback]

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

  3. Asian Chaturbate Muscle Says:
    April 12th, 2022 at 05:25

    … [Trackback]

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

  4. szex chat Says:
    May 11th, 2022 at 12:27

    … [Trackback]

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

  5. สล็อตวอเลท Says:
    June 3rd, 2022 at 04:59

    … [Trackback]

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

  6. ecstasy pill ornament Says:
    June 8th, 2022 at 22:48

    … [Trackback]

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

  7. nova88 Says:
    July 1st, 2022 at 21:09

    … [Trackback]

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

  8. ASC AR 15 5.56 30rd Mag Aluminum Black Says:
    July 5th, 2022 at 02:51

    … [Trackback]

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

  9. สล็อต pg เว็บตรง Says:
    August 27th, 2022 at 03:35

    … [Trackback]

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

  10. sbo Says:
    August 30th, 2022 at 19:44

    … [Trackback]

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

  11. Alphabay Market Says:
    August 31st, 2022 at 10:45

    … [Trackback]

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

  12. winbet 娛樂城 Says:
    September 8th, 2022 at 18:10

    … [Trackback]

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

  13. 이천눈썹 Says:
    September 18th, 2022 at 14:22

    … [Trackback]

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

Comments