Git merge local repository
I've met this problem for so many times and let me write a blog for solving this problem.
First, you have a repository called repo1 for example, and want to merge the repo2 to repo1 locally.What should we do for it ?
here's the command:
cd path/to/repo2
git remote add repo1 path/to/repo1
git fetch repo1
git merge repo1/master # or whichever branch you want to merge
git remote remove repo1