Git Quickie: Merge two different repos

I had a forked repo and another separate repo and I wanted them merged so that the newer repo (ie the forked one) had everything the separate repo had.

# in proj2:
git remote add proj1 path/to/proj1
git fetch proj1
git merge proj1/master # or whichever branch you want to merge

So for example, if Absinthe is the name of the forked repo and I want to merge into that fork, I’ll start in my proj2 repo called Everclear:

in Everclear project directory:
git remote add Absinthe /Users/jting/code/mks/Absinthe
git fetch Absinthe
git merge Absinthe/master

Reference: http://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s