I added a class library project to a web application solution. I get Error Message "An error occurred. Detailed message: No changes; nothing to commit." I use git repository on visual studio online.
-
4possible duplicate of [Git - nothing to commit (working directory clean)?](http://stackoverflow.com/questions/22067873/git-nothing-to-commit-working-directory-clean) – AleshaOleg Sep 05 '15 at 21:31
-
This is when you try to checkin? Is the new file in the Included Changes page? (Screenshot?) – Edward Thomson Sep 05 '15 at 22:59
-
Please don't mark this as a dup of a question about using the command-line. VS is trying to make an empty commit, which it should never do. This is obviously either a bug in Visual Studio or a very obscure workflow, possibly both. – Edward Thomson Sep 06 '15 at 00:03
1 Answers
I have seen this error in VS2013 when the file or folder would be ignored by GIT. You can confirm this by trying the add from the command line.
For example, the following shows this for the "bin" folder of the TestGit project:
$ git add bin
The following paths are ignored by one of your .gitignore files:
TestGit/bin
Use -f if you really want to add them.
fatal: no files added
If you confirm that is the issue, you will need to check .gitignore, .git/info/exclude, etc. and fix the settings. You can find which file to using git check-ignore as follows:
$ git check-ignore -v bin
.gitignore:190:bin bin
This example shows that line 190 of the .gitignore file needs is causing the bin folder to be ignored. Fixing this allow will allow that folder (or files in it) to be added.
Note: I added "bin" to .gitignore for this example; it is not part of the .gitignore file created by Visual Studio.
*Update: I didn't even need to add the line. The .gitignore added by Visual Studio already excludes the "bin" folder. See github/gitignore/VisualStudio.gitignore for even more detail.

- 1
- 1

- 111
- 4
-
1Indeed, however there's a wrinkle here. You must add the files to `.gitignore` after they've been created but before the commit. A bug in Visual Studio is causing the files to appear in the included changes list but not be included in the commit. – Edward Thomson Sep 22 '15 at 02:04
-
1From what I am seeing, files included in the solution show as changes that VS tries to commit, even when they are in .gitignore, and this is what leads to the error. – DrewTheRat Sep 22 '15 at 03:22