When you want to redo a branch forked from another branch (say
'master'), a handy way to work is to first detach HEAD at the
previous fork point:

    $ git checkout master...branch

and build an updated history on top of this state.  Once you are
done, you can verify your results with commands like:

    $ git show-branch branch HEAD
    $ git diff branch HEAD

and then finish it off with:

    $ git checkout -B branch

This way, you can keep the history of the previous round on 'branch'
until you are done with the new history you build on the detached
HEAD state, and if you do not like updated history, you can reset
back to branch@{1} easily.

But you may not even need to have such an easy access to the old
history and just want to restart, with:

    $ git checkout -B branch <old fork point>

Unfortunately, master...branch syntax does not seem to work for
specifying the "old fork point" for this purpose, even though we
have special case to support the syntax in the "detach at that
commit" case (the first command line example in this message).

Perhaps we should teach the <start-point> parser this syntax as
well?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to