Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are remote addresses pushed in Git?

Tags:

git

git-remote

When I'm working on a Git project, I clone the repo from Github, then add a remote: git remote add bitbucket https://[email protected]/foo/bar.git then I commit and push to both origin and bitbucket. Is the new remote also saved in Github? Will the other users see that I have added a new remote? Or is it just stored locally?

Thanks,

like image 693
jeff Avatar asked Dec 18 '22 06:12

jeff


2 Answers

Which remotes are used for your copy of a repository is not part of the repository itself and thus not pushed. Note that the remotes can also be local or on private networks.

like image 173
Elmar Peise Avatar answered Dec 26 '22 19:12

Elmar Peise


No, they are not. The git remotes are not a part of the git repository, and are only stored locally inside the .git folder.

like image 44
snoopy Avatar answered Dec 26 '22 19:12

snoopy