Is there a way to use Github and Unfuddle for the same repo? I am responsible for a repo hosted at Unfuddle, but I am not the main owner and it's private because it's part of an ongoing project. I still need to update the repo there when changes are made, but I would like to use the same set of files to create and update a public Github repo associated with my own account, is that possible? The reason I want to use the same files is that it's a WordPress plugin and it needs to be tested before I commit changes, therefore I need to use one set of files to not complicate the matter. Any help would be appreciated.
+2
A:
You can set up both the repositories as remotes and push/pull to and from both of them; Git is decentralized and thus doesn't really care about whether you have one remote or many.
http://www.kernel.org/pub/software/scm/git/docs/git-remote.html
Example:
git remote add github [email protected]:username/reponame.git
and then...
git push github <branchname>
git pull github
git log github/<branchname>
etc...
Amber
2010-07-23 07:33:01
I modified the config file to work with both and it's all setup and I committed the files to github. Awesome, thank you! Do I now have to do both of these every time I push changes? git push unfuddle master git push github master
Derek Herman
2010-07-23 08:29:52
Yes, although you can probably leave off the specific branch name if you want - `git push` without a ref specified just pushes all branches that have a matching-name branch on the remote.
Amber
2010-07-23 15:46:14
A:
Create your github repository, then from your Unfuddle local repository, run:
git remote add github [email protected]:YourUsername/YourReponame.git
Where YourUsername is your github user name, and YourRepository is your repository name. After setting up the github repository, the above URL with the user name and repository name filled in, should appear on your github repository page anyway.
Everything works like you'd expect, for example, pushing:
git push github
Your settings for the Unfuddle repository will work like before.