Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS 2019 .gitignore doesn't remove the error "db.lock permission denied"

I am trying to do git add . on my project but this certain error always appear. I have looked at every possible way on how to fix this and the top results always show to add .gitignore and still the error open(".vs/*****/v16/Server/sqlite3/db.lock"): Permission denied is showing. Any ideas how to fix this?

like image 232
Jhaze Franco Avatar asked Nov 19 '19 00:11

Jhaze Franco


2 Answers

The top results always show to add .gitignore and still the error

That would work only if .vs/ is not already tracked by Git.

Check first:

cd C:\path\to\my\repository
git rm --cached -r .vs/
echo .vs/>>.gitignore

The git add command should now work:

git add .
like image 58
VonC Avatar answered Oct 15 '22 14:10

VonC


for this if you work in visual studio when adding files in to git using git bash,first close visual studio. then use git bash to add files to github.It works for me.

like image 35
pamal Sahan Avatar answered Oct 15 '22 15:10

pamal Sahan