✏ comment on this page (Help on commenting)


Consider the following situation:

With git, you can achieve something like this a few ways:

The trouble with either of these approaches is, once you finally merge the feature branch in, the commits you imported earlier will now appear twice in the history.

You could avoid this if you did a rebase on the feature branch prior to merge. However, you shouldn't push rebased branches out to a shared repository. Having said that, once the feature branch is fully merged, I intend to delete it, so it would be a stale remote anyway (and there would be no need to push the rebase to the shared repository)