How to "git pull --rebase origin myBranch" ?

Answered

Hi

I'd like to know how I can achieve the command "git pull --rebase origin myBranch" within IDEA?

So what do I have to choose in the rebase dialog?

onto: my local branch? -> refs/heads/myBranch
from: refs/remotes/origin/myBranch

Merge Strategy?

5 comments
Comment actions Permalink

Currently, there seems to be no way to do this conveniently in IDEA. As that command actually consists of two operations, you can still achieve the same result:
VCS > Git > Fetch
VCS > Git > Rebase
Branch: myBranch
Onto: origin/myBranch
From: Hash of the starting point of your commits
I always get lost in that dialog because it mimics the command line interface but doesn't provide any guidance to the user.

I guess the much simpler solution is
Press F12 to open the Terminal window
enter pull --rebase origin myBranch

Let's hope that IDEA 14 will finally make Git integration a lot more approachable and usable.

P.S: I'm not sure if IDEA will honor git config --global pull.rebase true but as it just uses the command line client, I guess it might be worth a try.

0
Comment actions Permalink

In more recent versions of IDEA (and perhaps older ones as well), from the main menu you can choose VCS -> Update Project. In the resulting dialog, you can set the "Update Type" to Merge, Rebase or Branch Default.

5
Comment actions Permalink

Iroberts but "Update Project" does not allow to choose the branch to update from

0

Please sign in to leave a comment.