Process to use git subtrees

This is a great option of Git ! with more predictable behavior than submodules, in my opinion.

git remote add mysubtree
git subtree add --squash --prefix=mysubtree/ mysubtree v0.0.4
git subtree pull --prefix=mysubtree/ mysubtree v0.0.4 [--squash]
git subtree push --prefix=mysubtree/ mysubtree develop
# document somewhere the remote repositories to attach, and the place where thay are installed (the prefix)
git remote add mysubtree

git remote
git remote get-url mysubtree
  • git-subtrees.txt
  • Last modified: 2020/07/10 13:03
  • by jdx