Skip to content

Instantly share code, notes, and snippets.

@donovanr
Created July 1, 2015 15:37
Show Gist options
  • Select an option

  • Save donovanr/e4fac79e7cd99add25e1 to your computer and use it in GitHub Desktop.

Select an option

Save donovanr/e4fac79e7cd99add25e1 to your computer and use it in GitHub Desktop.
how to push to two git repositories at once, ie github and gitlab
# how to push to two remotes at once by adding a repo called 'all':
git clone git://original/repo.git
git remote add all git://original/repo.git
git remote set-url --add --push all git://another/repo.git
git remote set-url --add --push all git://original/repo.git
# git remote -v should list two push repos for 'all'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment