Skip to content

Instantly share code, notes, and snippets.

@JaimeStill
Last active May 28, 2024 18:02
Show Gist options
  • Save JaimeStill/46bf461ae2b5338bb83df26185c5d8c5 to your computer and use it in GitHub Desktop.
Save JaimeStill/46bf461ae2b5338bb83df26185c5d8c5 to your computer and use it in GitHub Desktop.
Push to multiple git remotes

Push to Multiple git Remotes

# configure origin
git remote add origin git@work.github.com:org/repo.git

# set two remote push targets
git remote set-url origin --add --push git@work.github.com:org/repo.git
git remote set-url origin --add --push git@github.com:JaimeStill/repo.git

# perform initial commit
git add .
git commit -m "initial"
git push -u origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment