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



Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s