Search code examples
gitgit-fetch

How to control the order of fetching when fetching all remotes by git fetch --all


I have a lot of remotes added in my git. Each remote is a link to a network share folder of different regions, and each remote contains the code submitted by one developer.

Everyday I need to fetch the latest code they submitted by git fetch --all.

Because of the geographical location, the speed of the network share folders are different. Some of them are very very slow. I want to fetch the data from the fastest share folder first so that I can start examining code while waiting for the fetching of other remotes.

The order of fetch by git fetch --all is not the same as the one shown by git remote -v. How is the order of fetching determined and is there a way to control the order?


Solution

  • It's simply the order they appear in .git/config. It's just a text file, I edit it all the time.