Skip to content

Instantly share code, notes, and snippets.

@andresaquino
Created November 21, 2010 01:08
Show Gist options
  • Save andresaquino/708323 to your computer and use it in GitHub Desktop.
Save andresaquino/708323 to your computer and use it in GitHub Desktop.
Update two or more repositories...
#I update github and gitorious (mi principal trunk is in gitorious)
# w/GitHub
git remote add github git@github.com:username/project.git
# w/Gitorious
git remote add gitorious git@gitorious.org:username/project.git
# and updating
git push gitorious master
git push github master
# Another option is use .git/config file:
[core]
repositoryformatversion = 0
filemode = true
bare = false
ignorecase = true
logallrefupdates = true
autocrlf = false
[user]
name = User Name
email = username@mail.com
[remote "gitorious"]
url = git@gitorious.org:project/mainline.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "github"]
url = git@github.com:username/project.git
fetch = +refs/heads/*:refs/remotes/github/*
[remote "public"]
url = git@github.com:username/monopse.git
url = git@gitorious.org:monopse/mainline.git
#and then, sync using command: git push public and voila!
#cheers!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment