repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

fix(git): disable autostash in the dotfiles repo and tell agents how to pull safely

01166bd0546f36f6aba24caa4ada136de1c55880

Oliver Krylow <o.krylow@isp-insoft.de> ·

SSH signature · not checked

Browse filesCompare with HEAD

Changed files (8)

AGENTS.md

Modified
51 51 Important secret paths include `ssh/*.key`, `gh/hosts.yml`, `pi/agent/auth.json`, `nushell/secrets.nu`, app private settings.
53 +## Git operations in this repo
55 +Autostash is off here (`git/gitconfig.dotfiles`, included via `[includeIf]` in `git/gitconfig`).
56 +Never run `git pull`, `git rebase`, or `git merge` with a dirty worktree: commit the work first, or stash it explicitly and pop it yourself.
57 +After any pull/rebase/merge, check `git stash list`; an entry named `autostash` means an operation was interrupted and your changes are in that stash, not in the worktree.
58 +Files that suddenly show as `deleted` after a failed Git operation are almost always that case, not real deletions; recover with `git stash apply` before doing anything else.
59 +Hooks (`pre-commit`, `pre-push` → `bootstripper.java` → mise) and the required `dotfiles-aes` filter can abort mid-operation; never pass `--no-verify` to work around them.
53 61 ## Symlink manifests
55 63 Files like `desktop.symlinks`, `fedora.symlinks`, `termux.symlinks`, `NB-00718.symlinks` are source/target pairs:

ArchLinux-dev.symlinks

Modified
5 5 ~/.pi
7 7 git/gitconfig
8 8 ~/.config/git/config
10 +git/gitconfig.dotfiles
11 +~/.config/git/.gitconfig.dotfiles
10 13 git/gitattributes
11 14 ~/.config/git/gitattributes

NB-00718.symlinks

Modified
40 40 git/gitconfig
41 41 ~/.config/git/config
43 +git/gitconfig.dotfiles
44 +~/.config/git/.gitconfig.dotfiles
43 46 git/gitattributes
44 47 ~/.config/git/gitattributes

desktop.symlinks

Modified
37 37 git/gitconfig
38 38 ~/.config/git/config
40 +git/gitconfig.dotfiles
41 +~/.config/git/.gitconfig.dotfiles
40 43 git/gitattributes
41 44 ~/.config/git/gitattributes

git/gitconfig

Modified
240 240 # On each host a different file might be symlinked into '.gitconfig.include'.
241 241 [include]
242 242 path = .gitconfig.include
244 +# The dotfiles repo itself needs stricter settings than everything else, because
245 +# it is always dirty and carries required content filters plus hooks.
246 +[includeIf "gitdir/i:**/dotfiles/"]
247 + path = .gitconfig.dotfiles

git/gitconfig.dotfiles

Added
new file mode 100644
1 +# Settings that only apply to this dotfiles repository.
2 +# Symlinked to '~/.config/git/.gitconfig.dotfiles' and pulled in by the
3 +# [includeIf] section in 'git/gitconfig'.
5 +# Autostash is convenient in normal repos, but harmful here: this worktree is
6 +# almost always dirty, 'secrets.nu' needs the required 'dotfiles-aes' filter,
7 +# and the pre-push hook shells out to Java/mise. When any of those fail (or an
8 +# agent aborts the command), the rebase stops before restoring the autostash:
9 +# the changes end up in a silent 'autostash' stash entry while the files look
10 +# deleted in the worktree. Refusing loudly is cheaper to recover from.
11 +[rebase]
12 + autostash = false
14 +[merge]
15 + autostash = false

termux.symlinks

Modified
7 7 git/gitconfig
8 8 ~/.config/git/config
10 +git/gitconfig.dotfiles
11 +~/.config/git/.gitconfig.dotfiles
10 13 git/gitattributes
11 14 ~/.config/git/gitattributes

x230.symlinks

Modified
37 37 git/gitconfig
38 38 ~/.config/git/config
40 +git/gitconfig.dotfiles
41 +~/.config/git/.gitconfig.dotfiles
40 43 git/gitattributes
41 44 ~/.config/git/gitattributes