Skip to content

Instantly share code, notes, and snippets.

@cw4d3
Created February 15, 2011 05:54
Show Gist options
  • Select an option

  • Save cw4d3/827148 to your computer and use it in GitHub Desktop.

Select an option

Save cw4d3/827148 to your computer and use it in GitHub Desktop.
pushing to numerous remote repos via .git/config
#update .git/config to something similar to this.
#from:
#stackoverflow: http://stackoverflow.com/questions/165092/can-i-#push-to-more-than-one-repository-in-a-single-command-in-#git
You can have several URLs per remote in git, even though the git remote command did not appear to expose this last I checked. In .git/config, put something like this:
[remote "public"]
url = git@github.com:kch/inheritable_templates.git
url = kch@homeserver:projects/inheritable_templates.git
Now you can say “git push public” to push to both repos at once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment