I'm quite curious btw. What do you usually do when you've already made a Pull Request for this branch and it got reviewed but then they request you to update your branch.
Do you still do a git pull --rebase origin master?
note: I'm using zsh shell with oh-my-zsh which has aliases:
gcm = git checkout master
ggpull = git pull origin
ggpush = git push origin
And at last I haven't setup on my new machine, but will do soon: alias rbm = gcm && ggpull && git checkout <current branch> && git rebase master (rebase branch to master)
The there's a interpolation you can use for getting current branch :) I think I'll have to modify above, but should give general idea.
An ever-smiling full-stack developer, specializing in the rapid development of custom web applications. Always eager to learn new technologies and concepts and share knowledge.
An ever-smiling full-stack developer, specializing in the rapid development of custom web applications. Always eager to learn new technologies and concepts and share knowledge.
Yujin, I currently use Bitbucket. It gives the option to rebase directly on PR diff view
So it's a bit easy if we don't have any conflict but if there are conflicts then we have to manually rebase with the target branch as @cyberhck
mentioned in his comment
I also like this approach.
I'm quite curious btw. What do you usually do when you've already made a Pull Request for this branch and it got reviewed but then they request you to update your branch.
Do you still do a
git pull --rebase origin master
?Do you do a
git push --force
after?me personally, if there's a update thing on PR, I simply run:
fix any conflicts, then:
note: I'm using zsh shell with oh-my-zsh which has aliases:
And at last I haven't setup on my new machine, but will do soon:
alias rbm = gcm && ggpull && git checkout <current branch> && git rebase master
(rebase branch to master)The there's a interpolation you can use for getting current branch :) I think I'll have to modify above, but should give general idea.
Thanks @cyberhck for sharing
Yujin, I currently use Bitbucket. It gives the option to rebase directly on PR diff view
So it's a bit easy if we don't have any conflict but if there are conflicts then we have to manually rebase with the target branch as @cyberhck mentioned in his comment
Oh, cool! I didn't know Bitbucket has that feature.
I personally don't like bitbucket but thanks for sharing