Git question about gitignore

I have a strange behaviour with .gitignore on a python project.
It is probably not related to Repl but as it’s not really code issue and I’m doing all git actions through Repl I think it can be posted here

I have a .gitignore in my repl and I want to ignore /.pythonlibs and /log in which there is a debug.log

In the .gitignore, i’m using :


But still the debug.log goes to github … Is there something i’m doing badly ?

I also have , in the .gitignore :


but there are still some files in .pythonlibs in github, not all of them but some

Is it because I had not created the .gitignore at the beginning of the project and some files were already sent ? is it possible to clean the git to say that i don’t want them anymore ? .gitignore is not enough ?


You need to remove the existing files from GIT before it’ll ignore them:

git rm --cached log
git rm --cached .pythonlibs

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.