GIT-DEBORIG(1)

πŸ’… git-deborig β€” the manual, but make it make sense

okay bestie, so this is git-deborig from the Debian Utilities crew, and no cap, it's the little script that could. Let's get into it ✨


πŸŽ€ NAME πŸŽ€

git-deborig β€” it literally tries to produce a Debian orig.tar for you using git-archive(1). That's the whole job. She's focused. She's iconic. She does one thing and she slays at it πŸ’–


🌸 SYNOPSIS 🌸

git deborig [--force|-f] [--just-print|--just-print-tag-names]
[--version=VERSION] [COMMITTISH]

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: git-deborig tries to produce the orig.tar you need for your upload by calling git-archive(1) on an existing git tag or branch head. That's it, that's the whole main character moment 🫢

It was written with the dgit-maint-merge(7) workflow in mind β€” like, that's its home turf β€” but lowkey it can be used with other workflows too. She's flexible like that πŸ’…

git-deborig will try several common tag names, bestie. And if that fails? Or if more than one of those common tags are present (chaos, honestly 😭)? Then you can just specify the tag or branch head to archive on the command line β€” that's the COMMITTISH up there in the synopsis. You're in charge πŸ‘‘

Also, super important: git-deborig will override gitattributes(5) that would cause the contents of the tarball generated by git-archive(1) to not be identical with the commitish archived. The two attributes it's overriding are export-subst and export-ignore. Like, not it trying to change your tarball behind your back, we don't do that here πŸ™ˆ

And one more thing β€” git-deborig should be invoked from the root of the git repository, which should contain debian/changelog. Root of the repo, got it? Not some random subdirectory, bestie. ✨


✨ OPTIONS ✨

  • -f, --force β€” overwrite any existing orig.tar in the parent directory. Like, yes, we're doing this, the old one is getting replaced πŸ—‘οΈ
  • --just-print β€” instead of actually invoking git-archive(1), it outputs information about how it would be invoked. Also, heads up: it ignores --force. πŸ’€
ok so real talk β€” running the git-archive(1) invocation that gets outputted with this option may not produce the same output. Why? Because git-deborig takes care to disable git attributes otherwise heeded by git-archive(1), as detailed up above. So don't be surprised, it's giving "trust me bro" but with a legit reason 🧚
  • --just-print-tag-names β€” instead of actually invoking git-archive(1), or even checking which tags exist (she's not even looking πŸ‘€), print the tag names we would consider for the upstream version number in the first entry in the Debian changelog, or the one supplied with --version.
  • --version=VERSION β€” instead of reading the new upstream version from the first entry in the Debian changelog, just use VERSION. You tell her the number, she uses the number. Simple as that πŸ“

πŸ’œ SEE ALSO πŸ’œ

go read those too, iykyk πŸ“š


πŸ‘‘ AUTHOR πŸ‘‘

git-deborig was written by Sean Whitton <spwhitton@spwhitton.name>. absolute legend, fr fr 🌈


Debian Utilities Β· 2025-08-15 Β· that's the source/version and date bestie, so if you're citing this page in your essay, there you go πŸŽ€ mwah, go archive something pretty πŸ’–βœ¨

πŸ“¦ where this page comes from