Git: How can I reconcile a locally rebased feature branch with its remote equivalent? -
Git: How can I reconcile a locally rebased feature branch with its remote equivalent? -
i've branched off of master
, done work on feature-branch
. pushed feature-branch
remote. other people's work gets merged master
. pull changes master
, rebase local version of feature-branch
off updated master
.
next time seek force feature-branch
remote can't because it's out of sync remote version, due rebase. solution when working lone has been forcefulness push, there improve solution? coworker of mine, rather forcefulness pushing, did pull , push, results pretty weird (other people's commits appear when doing pull-request master).
don't ever rebase branch have pushed.
you should never alter history after became public (which became pushing). rebase alters history (among others, e.g. amend).
you might think: "i can forcefulness it, right?" no: pulled feature-branch
need forcefulness next pull, too. worse: if there commits based on original feature-branch
need changed, too. become nightmare.
the solution @ point revert rebase , merge master
feature-branch
.
generally suggest never rebase , avoid fast-forward merges. there might come time when happy have meaningful history, if looks ugly. there nil gained linear history if doesn't represent actual history.
git
Comments
Post a Comment