diff --git a/docs/linux/git.md b/docs/linux/git.md index bccc60d..96aca33 100644 --- a/docs/linux/git.md +++ b/docs/linux/git.md @@ -25,4 +25,22 @@ then GIT_COMMITTER_NAME=$NEW_NAME fi' -- --all +``` + + +## git subtree + + +### add a subtree + +``` +git subtree add --prefix my-subdirectory http://mysite.com/my_other_project.git master --squash +``` + + +### update a subtree + +``` +git subtree pull --prefix my-subdirectory http://mysite.com/my_other_project.git master --squash + ``` \ No newline at end of file