यदि आप हमेशा repo1, repo2 और repo3 पर धकेलना चाहते हैं, लेकिन हमेशा केवल repo1 से खींचते हैं, तो दूरस्थ 'मूल' को सेट करें
[remote "origin"]
url = https://exampleuser@example.com/path/to/repo1
pushurl = https://exampleuser@example.com/path/to/repo1
pushurl = https://exampleuser@example.com/path/to/repo2
pushurl = https://exampleuser@example.com/path/to/repo3
fetch = +refs/heads/*:refs/remotes/origin/*
कमांड लाइन पर कॉन्फ़िगर करें:
$ git remote add origin https://exampleuser@example.com/path/to/repo1
$ git remote set-url --push --add origin https://exampleuser@example.com/path/to/repo1
$ git remote set-url --push --add origin https://exampleuser@example.com/path/to/repo2
$ git remote set-url --push --add origin https://exampleuser@example.com/path/to/repo3
यदि आप केवल से पुल करना चाहते हैं repo1, लेकिन धक्का repo1और repo2 एक विशिष्ट शाखा के लिएspecialBranch :
[remote "origin"]
url = ssh://git@aaa.xxx.com:7999/yyy/repo1.git
fetch = +refs/heads/*:refs/remotes/origin/*
...
[remote "specialRemote"]
url = ssh://git@aaa.xxx.com:7999/yyy/repo1.git
pushurl = ssh://git@aaa.xxx.com:7999/yyy/repo1.git
pushurl = ssh://git@aaa.xxx.com:7999/yyy/repo2.git
fetch = +refs/heads/*:refs/remotes/origin/*
...
[branch "specialBranch"]
remote = origin
pushRemote = specialRemote
...
Https://git-scm.com/docs/git-config#git-config-branchltnamegtremote देखें ।