Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8345769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:47:21+00:00 2026-06-09T06:47:21+00:00

I have a setup with 3 remote repositories, origin, internal, external. When I create

  • 0

I have a setup with 3 remote repositories, origin, internal, external.
When I create a new local installation of these, I clone origin and add internal and external as remotes.

New remote branches on origin show up when I do
git fetch –all
but on internal and external they don’t seem to be fetched from the server (although I see that the servers are contacted and queried).

I have tried also git remote update internal without any luck.

With git ls-remote internal I can see any newly created remote branches but I can’t clone them (probably because the information about the branches haven’t been fetched to my local repository).

Searching the internet I found this blog post http://www.jukie.net/bart/blog/fetch-all-git-branches which describes the same problem and solves it with a custom script.

When you clone a new git repository, using a recent git release, by default git will create a .git/remotes/origin with all remote branches. This file lists all remote branches that are to be updated on a fetch.

Over time the remote may get more branches, and it may be necessary to update the remote branch list. The way to find out what is available at a remote is to call git-ls-remote origin, then pick out the branches of interest, and add them to the .git/remotes/origin file.

Why doesn’t git fetch –all update the .git/remotes/[remote_name] file with new branches?
Is there really no way to update this with normal git commands?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:47:24+00:00Added an answer on June 9, 2026 at 6:47 am

    I found this other post [1]: In git, how do I check out a remote repository's remote branches? which pointed me to look in the git config for my setup. For some reason I had managed to get the remote to track only the master branch instead of the default glob refspec for the remote (under the refs/remotes/remote_name/ namespace).

    So my config looked like this

    [remote "internal"]
        url = path_to_my_remote_repo
        fetch = +refs/heads/master:refs/remotes/internal/master
    

    and changing it to this

    [remote "internal"]
        url = path_to_my_remote_repo
        fetch = +refs/heads/*:refs/remotes/internal/*
    

    solved the problem for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a setup project in a VS 2010 solution and I add/remove
My setup is that I have a local Maven repository on my machine, and
I have setup a polling system, where when you vote it stores your external
I have setup eclipse to attach to a local JVM. But when I try
I have recently begun a new project which runs on remote computer. I usually
I have remote debugger setup on both my client and remote machine. I'm just
I have tried following how-set-up-your-own-private-git-server-linux and private-remote-git-repositories-ubuntu-linode but I am still having problems. My
I have a remote git repository setup for centralized development within my team. However,
I have setup hudson to check out from my remote git repository but i
I have a git repository setup on a server: andy@ubuntu:/home/git/repositories$ ls gitosis-admin.git GoGoFlow.git andy@ubuntu:/home/git/repositories$

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.