Merging 2 Project with Git Subtree
-
Create folder to house / place the subtree project onto
-
Do Git Subtree Add
git subtree add --prefix <relative_path_to_subrpoject> <remote_git_url> <remote_branch_name_target>
-
If you want to update package from subtree, do Git Subtree Pull
git subtree pull -P <relative_path_to_subrpoject> <remote_git_url> <remote_branch_name_target>
-
If there are message, type
:q
to continue merge -
The result will be like this
The highlighted part is from your subtree remote
-
If you want to know what capabilities of git subtree
git subtree --help
No Comments