Last active
May 5, 2021 17:10
-
-
Save sfletche/8304df107538620c977e2ca82abf3a37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use the following to skip / remove a file from being updated by git | |
> git update-index --skip-worktree <filename> | |
Use the following to see which files are currently being skipped / ignored | |
> git ls-files -v . | grep ^S | |
Use the following to revert the skip | |
> git update-index --no-skip-worktrree <filename> | |
git will ignore any modifications or deletions to skipped files when staging commits or pulling changes | |
(essentially they are ignored by git) | |
Note: this only works for your copy of the repo (it's not possible for git to ignore changes to existing files for all users), | |
and so anyone who wants to differentiate their configuration will need to do this on their own machines. | |
Related SO -- https://stackoverflow.com/a/39776107/379512 | |
Docs -- https://git-scm.com/docs/git-update-index#_skip_worktree_bit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment