STG-PUSH(1)

✨ STG-PUSH(1) ✨

okay so this is stg-push from the StGit Manual, and bestie, it's literally the glow-up command for your patches πŸ’…


πŸ¦‹ NAME πŸ¦‹

stg-push β€” push (apply) one or more unapplied patches, no cap 🌸


πŸŽ€ SYNOPSIS πŸŽ€

stg push [OPTIONS] [patch]...
stg push [OPTIONS] -n <number>
stg push [OPTIONS] --all

πŸ’– DESCRIPTION πŸ’–

So the whole vibe here: you take one or more unapplied patches from the series and push them onto the stack. Iconic behavior, honestly.

By default, the first unapplied patch is the one that gets pushed. That's it. That's the default. 🫢

Now β€” and this is the part where you listen β€” unapplied patches may be pushed in arbitrary order, but out-of-order pushes may result in merge conflicts. It's giving chaos energy, ngl. If there are conflicts while pushing a patch, the conflicts are written to the work tree and the push command halts 😭. After that you can resolve the conflicts using the normal Git methods, or alternatively the push can be undone using stg-undo(1). Both valid, pick your fighter ✨


🌸 OPTIONS 🌸

  • -a, --all β€” push all the unapplied patches. every single one. go off πŸ‘‘
  • -n <n>, --number=<n> β€” push the specified number of patches. A negative number indicates to push all but that number of patches. little math moment, we love to see it 🧚
  • --reverse β€” push the patches in reverse order. chaotic, but make it fashion πŸ’€
  • --noapply β€” reorder patches by pushing without applying. reordering only, no actual applying happening here, iykyk
  • --set-tree β€” push patches keeping their original trees.

For each patch pushed, instead of performing a merge, the patch is pushed such the resulting tree will be identical to the tree associated with the patch. 🎯

This can be useful when splitting a patch by first popping the patch and creating a new patch with some of the changes. Pushing the original patch with --set-tree will avoid conflicts and only the remaining changes will be in the patch. literally the trick, bestie ✨

  • -k, --keep β€” keep the local changes. don't touch them, they're doing great πŸ’œ
  • -m, --merged β€” check for patches merged upstream. very responsible of you, honestly πŸ‘‘
  • --committer-date-is-author-date β€” instead of using the current time as the committer date, use the author date of the commit as the committer date. long flag, big commitment, but it slays πŸŽ€
  • --conflicts[=<policy>] β€” either "allow" or "disallow" pushing a patch with conflicts. the vibe check for conflict tolerance:

Using --conflicts=allow (or just --conflicts) allows pushing a patch that may result in unresolved merge conflicts. The patch will be pushed and files with conflicts will be left with conflict markers to be resolved manually; or the operation undone with stg undo --hard. This is the default behavior and also corresponds to the "stgit.push.allow-conflicts" variable being set to "true". πŸ™ˆ

Using --conflicts=disallow disallows pushing any patch that would result in merge conflicts. The operation will stop on the last patch that can be pushed without conflicts. This behavior can be configured by setting "stgit.push.allow-conflicts" to "false". 🚫

heads up bestie: --conflicts=disallow means it hard-stops at the last patch that's chill β€” no conflict markers, no drama, it just stops. and remember the default really is allow, so if you don't pass anything you're getting the conflict-marker experience fr fr 😭

πŸ’« STGIT πŸ’«

Part of the StGit suite β€” see stg(1) for the whole friend group 🫢


and that's the page! brought to you by StGit 2.7.0, dated 10/17/2026 β€” go push some patches, you're gonna ate πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from