Copied from an anwser on Stack Overflow
To merge project-1 into project-2:
$ cd path/to/project-2
$ git remote add project-1 /path/to/project-1
$ git fetch project-1 --tags
$ git merge --allow-unrelated-histories project-1/master
$ git remote remove project-1