Thirty Seconds of Insurance

Init and ignore

cd ~/.config/nvim
git init

.gitignore:

lazy-lock.json.backup
*.log
sessions/

Do commit lazy-lock.json — that is the file pinning every plugin to a known-good commit. It is the difference between “my setup” and “my setup, exactly”.

git add -A
git commit -m "my neovim config"
git remote add origin [email protected]:you/nvim-config.git
git push -u origin main

What you just bought

The config is now recoverable, diffable, and revertable. Every future change is visible as a diff rather than a vague memory of what you touched.