my project uses a (remote) master branch and plenty of (remote) feature branches. I usually start my work either on an existing (remote) feature branch or I create one.
The real work is done locally of course, therefore I use git pull/push to keep the remote feature branch in sync with my local work whenever necessary. Merging back to master is done via so called "pull requests" which appears to be a feature added by "bitbucket". I did not do that yet.
Now my issue: I want the changes recently added on master to become visible on my feature branch, but I want to keep my stuff on top, both on remote and local feature branch.
As far as I understand the git way I would
- rebase remote master onto my remote feature branch
- sync my remote/local feature branch as usual
and that should be it.
But how do I rebase remote branches onto each other ?
Of course I could e.g.
- checkout/pull/clone master to a local master branch,
- do the rebase onto the feature branch locally and
- push those changes to the remote feature branch.
But that does not "feel right".
Side comment: I am afraid the collegues in the projects do it 'their way' and do not think about it anyway. Whenever conflicts show up somebody will fix them.
Any suggestions about rebasing remote branches ? Or am I missing something else ?