Skip to content

repo: ignore the _opam symlink a worktree uses - #296

Merged
samoht merged 1 commit into
mainfrom
ignore-opam-symlink
Aug 4, 2026
Merged

repo: ignore the _opam symlink a worktree uses#296
samoht merged 1 commit into
mainfrom
ignore-opam-symlink

Conversation

@samoht

@samoht samoht commented Aug 2, 2026

Copy link
Copy Markdown
Owner

.gitignore had _opam/, which matches a directory only. Every git worktree here points _opam at the main checkout's switch with a symlink, so git listed it as untracked in every git status — and that is how it ended up committed to main earlier today (undone by #294, with the switch path of one machine baked into it).

Dropping the trailing slash covers the file, the symlink and the directory. Verified all three: git check-ignore matches _opam as a symlink, as a directory, and _opam/lib inside it, and a fresh worktree now has a clean git status.

A directory rule left it showing as untracked in every worktree status,
which is how it once got committed.
@samoht
samoht merged commit 9426ff6 into main Aug 4, 2026
5 checks passed
@samoht
samoht deleted the ignore-opam-symlink branch August 4, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant