Skip to content

Instantly share code, notes, and snippets.

@mrpatrick
Last active August 29, 2015 14:27
Show Gist options
  • Save mrpatrick/d0161117f0737a91af83 to your computer and use it in GitHub Desktop.
Save mrpatrick/d0161117f0737a91af83 to your computer and use it in GitHub Desktop.
Add a subtree repo/project to an existing repo
# Works with master branch
git subtree add --squash --prefix=circle [email protected]:avatarnewyork/circleci.git master
# Works with a branch other than master
git remote add circleci [email protected]:avatarnewyork/circleci.git
git fetch circleci
git subtree add --squash --prefix=circle -P circleci circleci/deployhq_only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment