Jazi
Jazi

Reputation: 6712

PhpStorm - How to pull many GIT repositories in one project

Let's say I have one project in PhpStorm IDE, and within it I have many Git repositories (1 framework module = 1 repo). I just want to ask how to pull changes from all those repositories at once?

I know, that I can commit or push changes on repo massively, but when pulling, it asks me for single Git root.

Upvotes: 5

Views: 784

Answers (1)

VonC
VonC

Reputation: 1323573

You could either:

  • use submodule (which can be tricky), to pull all subrepos as submodules

    git submodule update --rebase --remote
    
  • or script it as in this gist

    find . -name .git -type d \
    | xargs -n1 -P4 -I% git --git-dir=% --work-tree=%/.. remote update -p
    

In both instances, you would need to declare an external tool on the External Tool page of PhpStorm.

Upvotes: 1

Related Questions