Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqlite3 file add in .gitignore but still in the modified list?

Tags:

I ignore *.sqlite3 file both in the project directory and the global gitignore config, but after that the sqlite3 file show in the git modified log every time. How can I fix that?

like image 781
eddie yang Avatar asked Aug 15 '11 15:08

eddie yang


People also ask

What happens to files added to Gitignore?

gitignore file is usually placed in the root directory of a project. You can also create a global . gitignore file and any entries in that file will be ignored in all of your Git repositories.

How do I ignore a modified file in Git?

Set “–assume-unchanged” to a path to exclude to check on git commit and it will exclude your file from git commit. You will need to use the git update-index and –assume-unchanged to exclude files from git commit.

How do I exclude a .gitignore file?

If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and then add a .gitignore rule for it. Using the --cached option with git rm means that the file will be deleted from your repository, but will remain in your working directory as an ignored file.


1 Answers

If the file(s) is already in the repo ( ie. it is versioned ) it will continue to show as modified if you make changes to it. To make git start ignore them, first unversion the files ( using git rm --cached and git commit )

like image 190
manojlds Avatar answered Sep 27 '22 02:09

manojlds