Skip to content

Instantly share code, notes, and snippets.

@rossbar
Created September 16, 2015 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rossbar/ec6121d639458b803381 to your computer and use it in GitHub Desktop.
Save rossbar/ec6121d639458b803381 to your computer and use it in GitHub Desktop.
Add a git repo's entire history to another git project with subtree
# /rel/path/to/subproject/folder should not be created yet
# <branch> is the branch of the subproject you want to include in the current project
# Source: http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/
git subtree add --prefix /rel/path/to/subproject/folder git@github.com:<user>/<subproject>.git <branch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment