Skip to content

Instantly share code, notes, and snippets.

@abelardojarab
Created November 9, 2017 21:26
Show Gist options
  • Save abelardojarab/2b582fe416626b35e7e93c97fd710583 to your computer and use it in GitHub Desktop.
Save abelardojarab/2b582fe416626b35e7e93c97fd710583 to your computer and use it in GitHub Desktop.
Add and update a git subtree

Add a new git subtree

The common practice is to not store the entire history of the subproject in your main repository, but If you want to preserve it just omit the –squash flag

git subtree add --prefix .emacs.d/rtags https://github.com/abelardojarab/rtags master --squash

Update a git subtree

git subtree pull --prefix=.emacs.d/rtags  --squash https://github.com/abelardojarab/rtags.git master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment