purwa-astawa
8/3/2014 - 2:57 AM

adding subtree to a repo https://help.github.com/articles/about-git-subtree-merges

#Add a new remote URL pointing to the separate project that we're interested in.
git remote add -f spoon-knife git@github.com:octocat/Spoon-Knife.git

#Merge the Spoon-Knife project into the local Git project
git merge -s ours --no-commit spoon-knife/master

#Create a new directory called spoon-knife, and copy the Git history of the Spoon-Knife project into it.
git read-tree --prefix=spoon-knife/ -u spoon-knife/master

#Commit the changes to keep them safe.
git commit -m "Subtree merged in spoon-knife"

#to update the subtree
git pull -s subtree spoon-knife master