• git subtree add --prefix=<sub-repository-path> <sub-git-url> master [--squash] Add a new child repository to the parent repository
  • git subtree pull --prefix=<sub-repository-path> <sub-git-url> master [--squash] pull to update the child repository
  • git subtree push --prefix=<sub-repository-path> <sub-git-url> master Push sub-repository
  • Add a remote repository to a subrepository to make it easier to reuse the subrepository’s git repository address
    git remote add -f <sub-remote-git> <sub-git-url>
    git subtree add --prefix=<sub-repository-path> <sub-remote-git> master