| 拉取 | git subtree pull --prefix=<目录> <远程> <分支> [--squash] |
|---|---|
| 回推 | git subtree push --prefix=<目录> <远程> <分支> |
| 等价 | 回推本质是 subtree split 后推送 |
常用示例
常用示例
git subtree pull --prefix=libs/common vendor main --squash
git subtree push --prefix=libs/common vendor patch-1回推会基于目录历史重建提交,大型仓库耗时明显;频繁回推说明沟通方式可能需要调整。