假设我在 PhpStorm IDE 中有一个项目,其中有许多 Git 存储库(1 个框架模块 = 1 个存储库)。我只想问一下如何一次从所有这些存储库中 pull 更改?
我知道,我可以在 repo 上大量提交或推送更改,但是在 pull 时,它要求我提供单个 Git root。
最佳答案
你可以:
使用子模块(这可能很棘手),到 pull all subrepos as submodules
git submodule update --rebase --remote
或将其编写为 in this gist
find . -name .git -type d \ | xargs -n1 -P4 -I% git --git-dir=% --work-tree=%/.. remote update -p
在这两种情况下,您都需要 declare an external tool在 External Tool page 上的 PhpStorm。
关于PhpStorm - 如何在一个项目中 pull 多个 GIT 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39033297/