Skip to content

Instantly share code, notes, and snippets.

@constrict0r
Last active September 14, 2019 01:20
Show Gist options
  • Save constrict0r/99c0dc1c8680b3b93d98eca0e3434d60 to your computer and use it in GitHub Desktop.
Save constrict0r/99c0dc1c8680b3b93d98eca0e3434d60 to your computer and use it in GitHub Desktop.
Handle git subtree.
# Add.
git subtree add --prefix docs/source/parts [email protected]:constrict0r/parts.git master --squash
# Update.
git subtree pull --prefix docs/source/parts [email protected]:constrict0r/parts.git master --squash
# Remove.
git filter-branch --index-filter 'git rm --cached --ignore-unmatch -rf docs/source/parts' --prune-empty -f HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment