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
- opensuse-leap 16.0: stgit 2.7.0-bp160.1.1 Β· GPL-2.0-only
- opensuse-leap 16.0: stgit 2.7.0-bp160.1.1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms