Allen Li <[email protected]> writes:

> Is there a way to create a spinoff branch containing one commit?

Hmm, I don't think there is.

> I'm aware that you can use the region to select a number of commits
> for the spinoff branch, but I haven't found a way to select just one
> commit (HEAD).  I often make a single commit on a feature branch
> before realizing I should make a separate branch, but I couldn't get
> spinoff to work for me here.

While I use magit-branch-spinoff often, I've never made use of the
region behavior.  Looking into it a bit, it seems that the documentation
and the actual behavior don't match.  The docstring says that the
current branch is reset to the commit selected by the endpoint, but the
code uses commit^.  If the behavior matched the docstring, you should be
able to get the behavior you're after because the current branch would
be reset to the last commit of the selection.

I'll open an issue or PR within the next couple days to discuss this.

--
Kyle

-- 
You received this message because you are subscribed to the Google Groups 
"magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to