Git error while trying to commit with Visual Studio 2015 (opensdf file)

I get an error when I try to commit from Visual Studio 2015:

An error has occurred. Detailed message: Could not open "C: /ABC/DEFG-windows-universal/AAAA.Win10.opensdf": the process cannot access the file because it is being used by another process.

I tried to reboot and delete the file, but I have the same problem. Do I need to use the command line to make changes? (I click the Wizard, and I'm the only one working on this application)

+5
source share
3 answers

No, you need to add this file to your .gitignore .

Just create a .gitignore that contains the following:

 *.opensdf 

It’s easier, however, to let Visual Studio create a default .gitignore in your repository or load the standard Visual Studio .gitignore and add it to your project.

+11
source

Adding a locked file to gitignore is not an option for me, because I want it to be a version, but I may not need to commit it often with other minor changes that I make. Even if I temporarily exclude locked files, it still will not allow me to commit unlocked files. It is really very annoying.

What I find for me is using another Git client to commit files outside of VS2015. Also not an ideal solution, but it does the job. The only other solution I found was to close VS, open it again and write files before doing anything.

0
source

I had the same problem but with .opendb files. The added * .opendb to my ignore list worked wonders. Thanks for the help.

0
source

Source: https://habr.com/ru/post/1236360/


All Articles