Setting up 2 or more Repositories?
My question is: can i have 2 repositories without losing my original repository.
Lets say i want the the eclair source repository
repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
(already synced and working)
and i would also like to sync with cyanogens repository
repo init -u git://github.com/cyanogen/android.git -b 开发者_如何学JAVAeclair
All i basically want to do is have both repositories without altering or messing up the original.
thanks.
repo
works in the directory it is run. I would suggest keeping the repositories in separate places, as repo
isn't smart enough to track two different trees in this way.
I'm not totally sure I understand the goal here, but it seems like all you need to do is add remotes to the repo you're working on. From your local copy:
git remote add android git://android.git.kernel.org/platform/manifest.git # adds the "android remote"
git remote add cyanogen git://github.com/cyanogen/android.git #adds the cyanogen remote
When you've made local changes and want to push them up to android, then:
git push android eclair #pushes to the android remote, eclair branch
And likewise, to the cyanogen remote:
git push cyanogen eclair #cyanogen remote, eclair branch
You can also pull from these remotes and keep the three repos fairly in sync with one another.
精彩评论