STG-REDO(1)

πŸ’… STG-REDO(1) β€” the StGit Manual, bestie edition πŸŽ€

okay so real talk, this is the page for stg-redo, part of the StGit Manual. yes it's a whole manual page. no I will not be normal about it. 🌸


✨ NAME ✨

stg-redo β€” undo the last undo operation 🫢

like, you un-did something, and now you wanna re-do it. the circle of life fr fr.


✨ SYNOPSIS ✨

stg redo [OPTIONS]

that's it. that's the whole vibe check. πŸ’«


✨ DESCRIPTION ✨

okay so picture this 🌈 β€” if the last command you ran was an undo, then the patch stack state gets reset right back to its state before the undo. so you're basically rewinding the rewind. iconic behavior honestly.

and the way that consecutive redos work? each one undoes the effects of consecutive invocations of stg-undo(1). so redo, redo, redo just walks you forward through the undos in order. main character energy. ✨

⚠️ but bestie, hear me β€” it is an error to redo if the last stack-modifying command was not an undo. no undo, no redo. that's the rule. πŸ’€

✨ OPTIONS ✨

  • -n <n>, --number=<n> β€” undo the last n undos πŸ’œ like, you can redo a whole stack of undos at once. go off.
  • --hard β€” discard changes in the index and worktree πŸ™ˆ so whatever's sitting in your index and worktree? gone. not playing around with this one, ngl.

✨ STGIT ✨

part of the StGit suite β€” see stg(1) πŸ‘‘ (iykyk)


and that's the whole page, bestie πŸ¦‹ go forth and redo responsibly, mwah πŸ’–

StGit 2.7.0 🌸 10/17/2026 πŸŽ€ β€” yeah that's the version and the date, stamped right at the end like a little signature. slay. ⭐

πŸ“¦ where this page comes from