Last active
November 2, 2023 18:28
-
-
Save raymelon/e19e19ccc010cabe083e60843a2d0ec3 to your computer and use it in GitHub Desktop.
Untrack / Track a file after adding to gitignore, not delete
This file contains hidden or 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
| # source: https://superuser.com/a/1655712/454512 | |
| # | |
| # to untrack (future versions will not be included on git) | |
| git update-index --assume-unchanged <file> | |
| # to track again (future changes will be included by git again) | |
| git update-index --no-assume-unchanged <file> | |
| # to view untracked files | |
| # posix | |
| git ls-files -v | grep ^[h] | |
| # to view untracked files | |
| # windows | |
| git ls-files -v | find "h " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment