Search code examples
djangogitgithubgitignoregithub-for-mac

Ignoring file in Github and Django


Me and my friend are both working on a project in Django. We are beginners with both GitHub as well as Django. We have managed to use .gitignore to ingore certain files. This is how the .gitignore looks like :

.DS_Store
groupProject/__pycache__
marketplace/__pycache__
marketplace/migrations/__pycache__
marketplace/templatetags/__pycache__
db.sqlite3

The only issue that we have is that when we try to push we get an error saying that there is a merge conflict for this file 'db.sqlite3' . I have added this file in .gitignore and for some reason it still decides to read it?

What should we do?


Solution

  • Try to delete the db.sqlite from the repository with the command:

    git rm --cached db.sqlite
    

    I think this happened because yout ignored the db.sqlite after you added it to the repo ;)