Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm - How to pull many GIT repositories in one project

Tags:

git

php

phpstorm

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.

like image 539
Jazi Avatar asked Nov 08 '22 10:11

Jazi


1 Answers

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.

like image 116
VonC Avatar answered Nov 14 '22 22:11

VonC