Skip to content

Instantly share code, notes, and snippets.

@usagizmo
Created May 1, 2023 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usagizmo/688118ec82f4c19e80c58443e3d09b69 to your computer and use it in GitHub Desktop.
Save usagizmo/688118ec82f4c19e80c58443e3d09b69 to your computer and use it in GitHub Desktop.
# assume-unchanged: リポジトリが更新された場合、作業ツリー上の更新を破棄する
git update-index --assume-unchanged [FILENAME]
git update-index --no-assume-unchanged [FILENAME]
# skip-worktree: リポジトリが更新された場合、作業ツリー上の更新を保つ
git update-index --skip-worktree [FILENAME]
git update-index --no-skip-worktree [FILENAME]
# Check file ignore status
git ls-files -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment