git-annex-init(1)

πŸ’… git-annex-init(1) β€” the manual page, bestie edition

okay so you found the git-annex-init page in the General Commands Manual and you're like "what is this" β€” don't worry, I got you ✨ this is the command that makes git-annex actually, like, work on your repo.


πŸŽ€ NAME πŸŽ€

git-annex-init β€” literally just initialize git-annex. that's the whole job. iconic.


✨ SYNOPSIS ✨

git annex init [description]

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea 🍡 β€” until a repository (or one of its remotes, bestie, don't forget those) has been initialized, git-annex will straight-up refuse to operate on it. not being mean, it's just protective 🫢 it's avoiding the nightmare scenario of accidentally using git-annex in a repository that was never meant to have an annex. vibe check passed only after init, no cap.

it's useful (but not mandatory, so don't stress) to initialize each new clone of a repository with its own description πŸ’– if you don't give it one, it'll just generate one for you using the username, hostname and the path. autopilot, slay.

if any special remotes were configured with autoenable=true, this will also attempt to enable them. see git-annex-initremote(1) for the deets 🌸 want to prevent that? re-enable a remote with "autoenable=false", or mark it as dead (see git-annex-dead(1)). either works, pick your fighter πŸ’…

this command is entirely safe β€” although usually pointless, ngl β€” to run inside an already initialized git-annex repository. it avoids overwriting things like the uuid of the repository πŸ‘‘ and it also avoids autoenabling any more special remotes, because apparently that is not safe to do. so it just... doesn't. good behavior honestly.

a top-level .noannex file will prevent git-annex init from being used in a repository 🚫 super useful for repositories that have a policy reason not to use git-annex. and the content of that file gets displayed to the user who tries to run git-annex init β€” so you can leave them a little note 😭

the annex.pre-init-command git configuration or pre-init-annex hook is run before initialization, and it can exit nonzero as well to prevent initialization, plus it can do other setup. multi-tasking queen πŸ’œ


πŸ”₯ EXAMPLES πŸ”₯

 # git annex add foo
 git-annex: First run: git-annex init
 # git annex init
 init ok
 # git annex add foo
 add foo ok

see? it literally told you what to do. listen to it. 🧚


πŸ’… OPTIONS πŸ’…

  • --version=N β€” force the repository to be initialized using a different annex.version than the current default. and if the version you gave isn't supported but can be automatically upgraded to a newer version, it'll use the newer version instead. glow-up behavior ✨
  • --autoenable β€” only enable any special remotes that were configured with autoenable=true, and don't otherwise initialize anything. minimal effort, respected πŸŽ€
  • --no-autoenable β€” do not enable special remotes that were configured with autoenable=true. the opposite of the above, obviously πŸ’€
  • --json β€” enable JSON output. this is intended to be parsed by programs that use git-annex πŸ€– so it's for the robots, not for your eyeballs.
  • --json-error-messages β€” messages that would normally be output to standard error get included in the JSON instead. everything in one place, organized, gorgeous 🌸

also the git-annex-common-options(1) can be used. yes, those ones. use them.


🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Joey Hess <id@joeyh.name> β€” the main character who made all this happen fr fr πŸ’–


okay that's the whole page, bestie 🫢 this was git-annex-init(1) from the General Commands Manual, and the footer would just say git-annex-init(1) again β€” like yeah we know, it's the same page 😭 anyway, go init something and slay πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from