Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
365 views
in Technique[技术] by (71.8m points)

git - How I can do a pull for ALL repositories inside IntelliJ?

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

question from:https://stackoverflow.com/questions/65863598/how-i-can-do-a-pull-for-all-repositories-inside-intellij

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...