Answers for "git push to all remotes"

0

git push to all remotes

#To push all branches to all remotes:
git remote | xargs -L1 git push --all

#Or if you want to push a specific branch to all remotes:
#Replace master with the branch you want to push.
git remote | xargs -L1 -I R git push R master

#(Bonus) To make a git alias for the command:
git config --global alias.pushall '!git remote | xargs -L1 git push --all'
Posted by: Guest on December-10-2020
1

how to push code to multiple github repository

git remote set-url --add --push origin git://original/repo.git
git remote set-url --add --push origin git://another/repo.git
Posted by: Guest on July-16-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language