在sourcetree上使用subtree(macOS)

准备

首先,我们创建一个父仓库和一个子仓库(以SOC-WebConsole-Dashboard和SOC-Wbconsole-Common为例)。

我们需要把SOC-Wbconsole-Common(子仓库)关联到SOC-WebConsole-Dashboard(父仓库)的src/app/common目录。

在父仓库中新增子仓库

1.在sourcetree中打开SOC-WebConsole-Dashboard仓库,子树 -> 右键 -> 添加/链接子树;

在sourcetree上使用subtree(macOS)

2.添加源路径/分支/本地路径。

在sourcetree上使用subtree(macOS)

3.点击确定,完成子树添加,完成后入下图(这一步会自动拉取子仓库代码到父仓库的src/app/common目录);

在sourcetree上使用subtree(macOS)

pull 和 push子树

在sourcetree上使用subtree(macOS)

END~~~

相关推荐