Reputation: 8981
I have a file I have to be ignored by git I have done this actions
path_to_file/filename.py
path_to_file/filename.py
to .gitignoreThe file does not show up on git indeed but when I switch branches or even switch back to the original branch, the file is gone.
Upvotes: 1
Views: 45
Reputation: 1328202
The thing is: git rm --cached path_to_file/filename.py
would have worked even if the file was not present in the workspace (but was tracked by git)
So if you don't see that file after the git rm --cached step, that means it was deleted.
If you restore it and it does remain when switching branch, that means it is untracked (you can check that with git check-ignore -v -- path_to_file/filename.py
)
Upvotes: 1