A useful code snippet for copying existing repository with it's history to another repository, by creating patches from the source repository, and applying them in the destination repository.
References:
http://blog.neutrino.es/2012/git-copy-a-file-or-directory-from-another-repository-preserving-history/ http://stackoverflow.com/questions/13500294/merge-a-branch-into-a-new-sub-directory-on-the-master