I have cloned a git repo which has my emacs config files in. I would like to add pylookup in a subdirectory. What is the correct way to do this?
Below are the optio
If you create a Git submodule:
$ git submodule add git://github.com/tsgates/pylookup.git pylookup
$ git submodule init pylookup
$ git submodule update pylookup
Let's say there are some changes to pylookup and you want to get them:
$ cd pylookup
$ git pull origin master
$ cd ..
$ git add pylookup
$ git commit -m "Track new commit of pylookup"
I used subtree merge with a similar problem - http://git-scm.com/book/en/Git-Tools-Subtree-Merging. Something like:
$ git remote add -f pylookup /path/to/pylookup
$ git merge -s ours --no-commit pylookup/master
$ git read-tree --prefix=pylookup/ -u pylookup/master
$ git ci -m "merging pylookup into pylookup subdirectory"
Good guide here: http://jasonkarns.com/blog/merge-two-git-repositories-into-one