STG-FOLD(1)
π stg-fold β like, the manual, but make it make sense
okay bestie, welcome to stg-fold(1) from the StGit Manual β¨ this one's short and sweet and honestly kind of a banger, so let's go π
πΈ NAME πΈ
stg-fold β folds a diff file into the current patch π«Ά
like, it takes a diff and just⦠tucks it right in. no cap.
β¨ SYNOPSIS β¨
stg fold [OPTIONS] [file]
that's it. that's the whole vibe check π
π¦ DESCRIPTION π¦
okay so the whole point: this folds a diff file into the current patch. you hand it a GNU diff file β or, if you don't hand it anything, it reads from standard input β and it applies that onto the current patch. literally that simple π
now, the fun part, the options that change where stuff lands π
- with
--threeway, the diff gets applied onto the bottom of the current patch, and then a three-way merge happens with the current top. yes, that's a whole journey. she's doing the most. - with
--base, the diff gets applied onto the specified base instead, and a three-way merge happens with the current top.
both of these are giving "main character energy" for merges π
π₯ OPTIONS π₯
-t,--threewayβ performs a three-way merge with the current patch. the classic. the icon. β¨-b <committish>,--base=<committish>β uses<committish>instead ofHEADwhen applying the patch. swap out the base, slay π-p <n>,--strip=<n>β removes<n>leading components from the diff paths. the default is1, so if you were wondering why your paths look shorter than expectedβ¦ that's why π-C <n>β makes sure there are<n>lines of matching context for each change. context queen π--rejectβ leaves the rejected hunks sitting in".rej"files. ngl, not the prettiest outcome, but at least you get receipts π
heads up bestie:--rejectliterally means some hunks didn't make it in, and they get dumped into".rej"files instead. that's the deal, fr fr.
π STGIT π
part of the StGit suite β see stg(1) for the whole family tree π«Ά iykyk
made with love by the StGit girlies β this little gem comes from StGit 2.7.0, dated 10/17/2026 π see you in the next patch, bestie! ππ¦β
π¦ 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