3
I have a project that sends to 2 repositories at the same time using the same remote, example:
[remote "origin"]
url = https://gitlab.com/teste.git
url = http://bitbucket.org/teste.git
In this type of situation, when I want to pull the project, it will use which of the 2 links as the basis ?
Would have some way to define which link I want to use when pulling ?
I believe he does not pull from the 2 repositories at the same time, because if there was a difference between them would be pointed out some error or something like.
the two branchs have the same name? why can you specify the name this way: git push origin [name-branch]
– Albertt Santos
Yes, with the same name, but my doubt is at pull time, which of the Urls will Git pull.
– João Carlos
If I’m not mistaken, if you spin
git remote -v
, it shows one of the Urls as fetch - That’s how he’ll do the pull.– hkotsubo