Maximum Number of Git URLs Removed

Is there a limit - practical or otherwise - to the number of remote git urls that can exist in one git repository?

For example, consider having 10,000 push-urls on a given remote control. Is it just a matter of time to complete git push?

+4
source share
1 answer

Remotes are usually tracked at .git/config. I did a test by running n=0;while true;do n=$((n+1));git remote add $n http://$n;donein the git repository for a while. He created 353,804 remotes before I pressed Ctrl-C. The size .git/configis only 100K (as @OzgurMurat points out, the size is wrong. It should be about 30M). I think the number depends on the maximum size of one file that is allowed on the system.

push, . git , , 10 000 , . , , 10 000 . echo hello world > aaa.txt;git add .;git commit -m'hello world' . git push , origin. , . r=0;while [ $r -lt 10001 ];do r=$((r+1));git push $r master; done`. , .

. , , , , . , . git, ssh http. , . , , , . 3 .

+2

Source: https://habr.com/ru/post/1677963/


All Articles