I have a NetBeans file “nbproject/project.properties” that always shows up in the “Changes not staged for commit” section (when I do git status). How could I move this to the Untracked files section (without adding it to .gitignore) ? I tried this command git rm --cached but what happened is the file shows as untracked in my local repo and got removed in the remote one but what I want is to keep it in remote and untrack only in local repo.
I have a NetBeans file nbproject/project.properties that always shows up in the Changes not
Share
You could update your index:
and make sure it never shows as “updated” in your current repo.
That means it won’t ever be pushed, but it is still present in the index.
(and it can be modified at will in your local working tree).
git update-index --no-assume-unchanged <file>git ls-files -v | grep '^h '