I can't help with the more complicated parts of your question, but you can run a reset from Magit with x (you'll be prompted for a commit to reset to, so you'll have to type HEAD~). x runs git reset --mixed which is git's default mode for resets. If you want to run with a different mode, X will give you pop up where you can choose the mode.
More details in the docs: https://magit.vc/manual/magit.html#Resetting -Ben On Thu, Nov 30, 2017 at 1:54 PM Paul Smith <[email protected]> wrote: > Hi all. This mailing list seems somewhat sparsely used but I don't > know that a GitHub issue is the right thing. > > Fairly often I find myself wanting to split commits when I do > interactive rebasing and I'm wondering if anyone has hints for how to > handle this more easily using Magit. > > What I do today is invoke interactive rebase from Magit and mark the > commit I want to split with "e" (edit). When Magit stops, I open a > shell and run git reset HEAD~, then I go back to Magit and use it to > add the bits I want to make the new commit(s). Often I want to use > some form of the original commit message when I create the extra > commits, so I also have to go spelunking to get a copy of the "under > edit" commit message and paste it in. > > Then I always forget whether or not I have to create the final commit > myself, or whether "rebase continue" will do it for me (it doesn't :)). > Then I use "r r" to continue. > > Are there Magit features that will make this simpler for me, that I > just don't know about? Things that would be nice: > > * Automatically do the reset operation. I can't come up with the > right Magit "reset" operation for this. Is there a simple way to > run the "git reset HEAD~" operation, or a shortcut? Could there be > a mode in interactive rebase that would to this, some kind of > "split" operation or something instead of just "edit"? I guess that > requires a new feature in Git itself. > * Automatically insert the commit message from the commit I'm editing, > when I make a new commit. Or some command that will let me easily > yank that message and start editing it. > * Maybe something that does something smart if I "r r" (continue) when > there are still files modified or staged. I'm not sure about this > one. > > I'm happy to create GitHub issues for these if appropriate. > > -- > 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. > -- 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.
