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?
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.
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.
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.
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
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With