1

I have a parent project with more than one repositories. If I use the IntelliJ context menu after select all repository only I can do one git pull for one repository. In eclipse I can pull all repositories with this logic (select all > context menu > pull).

Should I use the IntelliJ terminal to use some command that performs the operation of pulling all the repositories without clicking one by one on the context menu?

enter image description here

Carlos Martinez
  • 335
  • 1
  • 9

1 Answers1

2

Maybe what you are looking for is the Update project option (Git-> Update Project or Alt+T). If you have a multi-repository project, it fetches changes from all repos and merges changes to your local copy:

When you perform the update operation, IntelliJ IDEA fetches changes from all project roots and branches, and merges the tracked remote branches into your local working copy (equivalent to pull).

Here, for example, how it looks when performing Update operation for the IntelliJIdea project itself. It consists of two independent git repositories: android and IntelliJ-community.

enter image description here

Before updating the project, IntelliJ asks you how to update local copy after fetching: rebase or merge. By default, IntelliJ, when doing pull, performs pull without -rebase option. It's logical because when doing pull, you usually do it only on one branch, and it could be only your development branch. But when doing Update Project, IntelliJ fetches all remote-tracking branches. So maybe it wise to use rebase.

Please see here and here for rebase vs merge.

Dmitry.M
  • 2,833
  • 1
  • 17
  • 30