git-annex-unannex(1)
π git-annex-unannex β the "undo my oops" command
okay bestie, welcome to the git-annex-unannex(1) manual page, aka the glow-up reversal spell for when your finger slipped and you ran git annex add on something you did not mean to add. no cap, we've all been there. π
β¨ SYNOPSIS β¨
git annex unannex [path ...]
πΈ DESCRIPTION πΈ
so here's the vibe: you accidentally ran git annex add and now you're sitting there like π. use this command to undo that. it puts the file back how it was before the add. literally undoes it. the way that it just fixes your whole situation? iconic. π
β οΈ but listen β for safety, the content of the file remains in the annex until you usegit annex unusedandgit annex dropunused. so it's not gone-gone, it's just... chilling in there. do those two steps if you actually want it gone. π«Ά
and now the part where I have to be a little bit real with you: this is not the command for you if you intentionally added a file a while ago and just don't want its contents anymore. different situation, different tool, bestie. in that case you should use git annex drop instead β and you can also git rm the file. periodt. π₯
π OPTIONS π
--fastβ normally this does a slow copy of the file. in--fastmode, it instead makes a hard link from the file to the content in the annex. but use--fastmode with caution, because editing the file will change the content in the annex. yeah. that's the whole thing. do not play with it. π--jsonβ enable JSON output. this is intended to be parsed by programs that use git-annex. each line of output is a JSON object. very much for the robots, not for the vibes. π€β¨--json-error-messagesβ messages that would normally be output to standard error are included in the JSON instead. so all the little sad messages get tucked into the JSON. π«Ά- file matching options β the
git-annex-matching-options(1)can be used to specify files to unannex. yes, you get to be picky about which files. main character energy. π - Also the
git-annex-common-options(1)can be used. π
π SEE ALSO π
git-annex(1)β the mothership. go read her. π
βοΈ AUTHOR βοΈ
Joey Hess <id@joeyh.name> β the legend himself. no notes. π
π¦ okay that's the whole page bestie!! you've officially read the git-annex-unannex(1) manual page, part of the git-annex family. now go un-add that file and live your truth. slay, stay hydrated, and always double-check before you git annex add something. iykyk. πβ¨πΈπ«Άπ
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- debian trixie: git-annex 10.20250416-2 Β· AGPL-3.0-or-later
- debian trixie: git-annex 10.20250416-2+deb13u1 Β· AGPL-3.0-or-later
- epel 10: git-annex 10.20250320-1.el10_0 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250630-4.fc43 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250929-5.fc43 Β· AGPL-3.0-or-later
- fedora 44: git-annex 10.20260115-1.fc44 Β· AGPL-3.0-or-later
- nixos 26.05: git-annex 10.20260421
- nixpkgs unstable: git-annex 10.20260421
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- ubuntu noble: git-annex 10.20240129-1build1 Β· AGPL-3.0-or-later
- ubuntu questing: git-annex 10.20250721-1
- ubuntu resolute: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- ubuntu stonking: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms