Reputation: 1597
I am having problems with data.sqlite and members/model.pyc This is how my .gitignore file looks. If the above-mentioned files show as modified it means git is still tracking them right? These files were not tracked before so I am not sure why it is not ignoring those files....
*.py[cod]
*.sqlite
# C extensions
*.so
# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
__pycache__
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
nosetests.xml
# Translations
*.mo
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
*.log
*.pot
*.pyc
local_settings.py
Upvotes: 4
Views: 2694
Reputation: 11
If you would like git to ignore changes to a file in the repo you can use:
git update-index --assume-unchanged foo.pyc
This will keep the file in the working directory as well as the repository itself.
Note that using git rm --cached foo.pyc
will keep the file in the working directory but will stage the file to be deleted from the repo.
Upvotes: 1
Reputation: 930
try remove those files from git cache
git rm --cached data.sqlite
git rm --cached members/model.pyc
Upvotes: 0
Reputation: 41281
If the file already exists, you need to force-delete it:
git rm --cached foo.pyc
for every file already tracked. Commit, push, and profit. The file will remain ignored but in the working directory.
Upvotes: 9