I am trying to exclude Pipfile and Pipfile.lock by adding two lines in my .gitignore file. But they are not being omitted when they are pushed to git. Can someone please let me know why.
My .gitignore looks like this
Pipfile
Pipfile.lock
I am trying to exclude Pipfile and Pipfile.lock by adding two lines in my .gitignore file. But they are not being omitted when they are pushed to git. Can someone please let me know why.
My .gitignore looks like this
Pipfile
Pipfile.lock
.gitignore has no effect whatsoever on what will be pushed. What will be pushed is whatever is on the revisions you are pushing. So if the files are already part of some of those revisions (in other words, they are already tracked), adding lines in .girignore won't make a difference. If you want them to be gone from those revisions then you will have to rewrite history. How to remove file from Git history?