Reputation: 3345
I use a rebase workflow with Egit in Eclipse. I work on a local branch, call it "working" for the purposes of this question. When I'm ready to integrate my changes, I have to:
master
working
master
, resolving any conflictsmaster
working
As you can see, there is a lot of branch switching going on. It's not a big time drain, since switching branches is pretty fast. However the time adds up and it's additional steps to teach new people to do. What I'd really like to do is, while on working
:
master
being updated)master
master
working
In this workflow, I also wouldn't have to completely unnecessarily switch branches just to pull in changes and continue working. Just pull, rebase, continue.
How do you configure git to always update master
on a pull, even if you're on another branch? I'd prefer an answer that uses Egit, but command line solutions are acceptable too - they may be able to be performed with Egit.
Upvotes: 2
Views: 93
Reputation: 1325077
You could rather:
fetch
(no need to change your current branch working)rebase origin/master working
master
and merge working
(fast-forward)The last step would update master with both origin/master
and working
.
Upvotes: 2