STG-DELETE(1)

πŸ’… stg-delete β€” the manual page, but make it cute ✨

ok so bestie, welcome to stg-delete, a page straight out of the StGit Manual. it's the one that deletes patches. that's the whole vibe. let's get into it 🫢


🌸 SYNOPSIS 🌸

here's every single way you can call this thing, and yes you need all four:

stg delete [OPTIONS] [<patch>...]
stg delete [OPTIONS] [-A] [-U] [-H]
stg delete [OPTIONS] --all
stg delete [OPTIONS] --top

four whole moods. pick your fighter πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

delete patches. that's it. that's the description. short, sweet, iconic πŸ‘‘


✨ OPTIONS ✨

okay this is the part where we go through literally every flag, and i mean every flag. no skipping. no cap 🧚

  • -a, --all β€” nukes all the patches. every last one. gone. πŸ’€
  • -A, --applied β€” deletes the applied patches. just those ones, bestie.
  • -U, --unapplied β€” deletes the unapplied patches. the ones just chillin' off to the side.
  • -H, --hidden β€” deletes the hidden patches. yes, the sneaky ones. they're not immune πŸ™ˆ
  • -t, --top β€” deletes the topmost patch. just the one on top, like picking the cherry off πŸ“
  • --spill β€” deletes the patches but doesn't touch the index and worktree. the whole point is it "spills" the patch contents into the index and worktree instead. lowkey such a moment ✨
heads up: this only works when you're deleting applied patches at the top of the stack. anywhere else and it's a no-go.

and like, why would you even want this? apparently it's useful for splitting a patch into smaller pieces. so it's giving "unpacking your suitcase on the floor" energy 🧳

  • -b branch, --branch=branch β€” use branch instead of the current branch. like, go do your thing over there instead πŸ¦‹
  • --conflicts[=policy] β€” either "allow" or "disallow" pushing a patch with conflicts. two paths, choose wisely 🌈

using --conflicts=allow (or just --conflicts, the lazy girl version) lets a patch get pushed even if it might end up with unresolved merge conflicts. the patch gets pushed, and the files with conflicts are left with conflict markers for you to resolve manually. or you can just hit stg undo --hard and pretend it never happened 😭. this is the default behavior, and it also lines up with "stgit.push.allow-conflicts" being set to "true".

using --conflicts=disallow means no patch that would cause merge conflicts gets pushed. periodt. the operation stops on the last patch that can be pushed without conflicts. and you can configure this whole thing by setting "stgit.push.allow-conflicts" to "false" πŸ‘‘


πŸ‘‘ STGIT πŸ‘‘

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


that's the whole page bestie, you ate that πŸŽ€ go forth and delete responsibly 🌸

p.s. this little beauty is from StGit 2.7.0, dated 10/17/2026. mwah πŸ’‹
πŸ“¦ where this page comes from