# memory: instinct-git-config-unset-defaults-to-local
git config --unset は --local 固定なので --worktree で書いた値を消せない。素の --get はグローバルまで解決した値を返すので「local にある」証拠にならない。消す前に層を特定する。--worktree --get と --local --get を別々に引き、見つかった層と同じ層に --unset を付ける。確認は設定値ではなく git hook run post-commit の発火で行う。
## ポイント
- git config --unset は --local 固定なので --worktree で書いた値を消せない
- 素の --get はグローバルまで解決した値を返すので「local にある」証拠にならない
- 消す前に層を特定する。--worktree --get と --local --get を別々に引く
- 見つかった層と同じ層に --unset を付ける
- 確認は設定値ではなく git hook run post-commit の発火で行う
## 関連ページ
[[topic-git-pr-branch]] [[instinct-repo-local-hookspath-kills-all-worktrees]]
## 関連概念(未作成)
`git config layers` `git hooks management`
memory: instinct-git-config-unset-defaults-to-local