What is the equivalent of git reset HEAD^?

11 views
Skip to first unread message

François Beausoleil

unread,
Jan 31, 2022, 3:53:05 PMJan 31
to StGit (Stacked Git)
Hi! I have a patch I'd like to split in multiple chunks. What would be the right set of commands to do that?

I made some changes and had to run away. I used `stg new -m temp temp && stg refresh`. I did some stuff on another branch, then came back to this branch, ready to do some more work. In regular git, I would `git reset HEAD^` and then create new commit objects. What would the equivalent be in StackedGit?

Thanks a bunch!
François

Peter Grayson

unread,
Feb 1, 2022, 5:40:13 AMFeb 1
to StGit (Stacked Git)
There are a couple of ways to "spill" the patch contents such that your changes are back in the working tree.

Using `stg refresh --spill` would retain your "temp" patch. The patch would be empty and your changes would remain in the working tree.

Using `stg delete --spill temp` would delete the "temp" patch and also leave its changes in the working tree.

Using `stg pop --spill` would pop "temp" leaving its changes in the working tree and also retaining those changes in the "temp" patch.

For this situation, you probably want to use `stg delete --spill temp`.

Cheers,
Pete
Reply all
Reply to author
Forward
0 new messages