Hg: How to do a rebase like git’s rebase

VonC has the answer you’re looking for, the Rebase Extension. It is, however, worth spending a second or two thinking about why neither mq nor rebase are enabled by default in mercurial: because mercurial is all about indelible changesets. When I work in the manner you’re describing, which is nearly daily, here’s the pattern I … Read more

Git commits are duplicated in the same branch after doing a rebase

Short answer You omitted the fact that you ran git push, got the following error, and then proceeded to run git pull: To [email protected]:username/test1.git ! [rejected] dev -> dev (non-fast-forward) error: failed to push some refs to ‘[email protected]:username/test1.git’ hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. … Read more

Git push rejected “non-fast-forward”

It looks, that someone pushed new commits between your last git fetch and git push. In this case you need to repeat your steps and rebase my_feature_branch one more time. git fetch git rebase feature/my_feature_branch git push origin feature/my_feature_branch After the git fetch I recommend to examine situation with gitk –all.