16

Setup:

  • Windows 10
  • Visual Studio 2015 with update
  • Running in Administrator mode

I cannot commit my changes using Visual Studio 2015 because the commit option does not appear.

When I go to the source folder and try to commit from there, I have n changed files and so I click "Stage Changed" which brings up a dialogue "Stage n untracked files?", to which I click "Yes".

I am then presented with a failure error:

error: open("myfile.VC.opendb"): Permission denied fatal: Unable to process path myfile.VC.opendb

Where myfile is just the name of some arbitrary file.

However, if I close the solution and then try commit from the folder, it all works as intended...

What is going on here? I have all the updates.

2

3 Answers 3

39

The .opendb file was added in Visual Studio 2015 update 1, but was not added to the default .gitignore file until after the release of update 1.

You can use the updated version, found here, the .opendb extension was added on Dec 1 2015:

enter image description here

2
  • Thank you for your help!
    – pookie
    Jan 24, 2016 at 19:11
  • 2
    Exactly what was needed.
    – Waldemar
    Jun 19, 2016 at 11:37
16

I also had this problem going from Visual Studio Express 2013 to Visual Studio Community 2017, for the same reason. I found this question and answer useful, but resolved it slightly differently.

I deleted the .gitignore file (actually, just moved it out just in case this didn't work) and in the Team Explorer window, went to Settings / Git / Repository Settings / Ignore and Attributes files. Under "Ignore file" it said "There was no .gitignore file found", and next to it there was an "Add" button. Clicking "Add" generated the default VSC 2017 .gitignore file and resolved the problem.

6

I had the same problem on the Team Explorer-Home go to settings -> repository settings-> Ignore & Attributes File -> click on add then on Team Explorer-Home-> global settings -> enable push -- force and that worked for me .

1
  • Enabling force push shouldn't be needed for that. Mar 14, 2022 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.