as am working on a project in visual studio and am trying to commit the changes and i have added the files in the .gitignore which i do not want to commit them. as well as i have added /.vs/slnx.sqlite in the .gitignore file but still it is showing as an uncommitted file. what i have to do. Please help me with this problem
`/.vs/angular2-research/v15
/.vs/config/applicationhost.config
/.vs/slnx.sqlite
/.vs/slnx.sqlite-journal
/cleanui/cleanui-admin-template-angular/node_modules
/cleanui/.vs
/.vs
slnx.sqlite
*.sqlite
/.vs/*.sqlite
.vs/*.sqlite`
it's showing up as uncommitted? If that's the case then adding it to .gitignore changes nothing because .gitignore only works for untracked files (files that git hasn't been tracking so far.... if a file has already been committed on a previous revision [and therefore is part of HEAD] then .gitignore changes nothing).... so, two approaches are to be followed:
Keep the file on the project but specifically ask git to not care if it changes. Then you can do git update-index --assume-unchanged somefile
Remove the file from the history of the branch. This is quite a different endeavor and requires rewriting the history of the branch (or branches) Completely remove file from all Git repository commit history
Just keep that in mind that those files stores some local user settings and preferences for projects (like what files you had open). So every time you navigate or do some changes in your IDE, that file is changed and therefore it checks it out and show as there are uncommitted changes.
For the slnx.sqlite, I just got rid off it completely like following:
git rm {PATH_OF_THE_FILE}/slnx.sqlite -f
git commit -m "remove slnx.sqlite"
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