STG-UNDO(1)

πŸ’… STG-UNDO πŸ’…

okay so bestie, welcome to stg-undo(1) β€” it's a page straight out of the StGit Manual (section 1, if we're being official about it), and honestly? it's giving "oops, my bad" in the best way possible 🫢


✨ NAME ✨

stg-undo β€” undo the last command πŸŽ€


🌸 SYNOPSIS 🌸

stg undo [OPTIONS]

that's it. that's the whole vibe. no cap ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜•: stg undo resets the patch stack to the state before the last operation. literally rewind, main character style πŸ’…

and the iconic part? consecutive undos keep going back β€” each one takes you to yet older stack states. it's a whole time machine situation, one step at a time 🌈βͺ


πŸ’– OPTIONS πŸ’–

  • -n <n>, --number=<n> β€” undo the last <n> commands, not just one. yes bestie, you can go back multiple steps at once πŸ‘‘
  • --hard β€” discard changes in the index and worktree 😭⚠️ like, actually throw them away. be so serious before you type this one, fr fr
πŸ™ˆ heads up: --hard tosses your index and worktree changes. once they're gone they're gone β€” no undo for your undo. vibe check first, please πŸ’€

🧚 STGIT 🧚

part of the StGit suite β€” see stg(1) for the whole family πŸ’œ iykyk


and that's the page, bestie ✨ this icon of a manpage is from StGit 2.7.0, dated 10/17/2026 β€” go forth and rewind responsibly πŸ’…πŸŽ€πŸ’–

πŸ“¦ where this page comes from