Visual Studio 2013 Team Explorer/Git integration missing files

I’ve set up Visual Studio 2013 with the native Git integration & BitBucket.

This has worked fine so far, but I noticed that Visual Studio stopped tracking newly created files (created through the IDE, such as simple new .cs files) for upload to BitBucket.

  • Commit/Push for changes from already tracked files still works fine
  • The new files are not showing up in the Excluded Changes or Untracked Files lists
  • The new files are included in the project files (and those are showing the correct changes)
  • The files are definitely not excluded any other way (.gitignore or otherwise).

What else may cause the new files to not get tracked anymore?

  • What are the big differences between TFS and Git for source control when using Visual Studio 2013?
  • Visual Studio ignores *.jfm entry in the gitIgnore file
  • Where does the default Visual Studio 2013 .gitignore reside?
  • How do I automerge non-conflicting conflicts
  • Change GIT account of Visual Studio Team Explorer
  • Visual Studio 2013 git, only Master branch listed
  • How to show 'git blame' in Visual Studio 2013?
  • Use existing source code in another project/namespace
  • 12 Solutions collect form web for “Visual Studio 2013 Team Explorer/Git integration missing files”

    I experienced something similar recently but excluding and then re-including the missing files didn’t work for me. In VS2013 Premium, I noticed there’s a “Untracked Files” section at the bottom of the Changes window. It was simply a matter of right-clicking the files I wanted to include and adding them. Not ideal, indeed, but another work-around.

    I have the same problem as OP:

    • Commit/Push for changes from already tracked files still works fine
    • The new files are not showing up in the Excluded Changes or Untracked Files lists
    • The new files are included in the project files (and those are showing the correct changes)
    • The files are definitely not excluded any other way (.gitignore or otherwise).

    So, it appears that visual studio somehow thinks these files are tracked, while they’re not, as they do not show up under untracked files.

    My workaround

    As I cannot add the untracked files in visual studio, the workaround is to use git bash, and manually do git add for each file that should be added. After that they work fine within visual studio again.

    I hope this is fixed soon… apart from this bug, the git integration seems very nice from the short time I’ve tried it.

    I had the same problem where I added a .cs file, and VS doesn’t recognize it as added, and won’t included it in my changes.

    As a workaround, you can open up SourceTree (mad by Atlassian to work with BitBucket), look at the “Unstaged Files” section, and right click > Add the file. VS will immediately pick up the change/add and you can commit via VS.

    Not ideal, as you still can’t trust/rely on VS to track your commits.

    even if it’s quite old question, I’ve got a similar problem last week on VS2013 and none of previews workarounds are efficents for me.
    While editing a file, it’s appear on Team Explorer list of modify files but, as soon as they are saved, they disaperead from any lists. Other tools (git bash, tortoise, …) saw them as modify and uncommit but not VS.
    I solutionne this problem in the parameter of Git in Team Explorer by generating the .gitIgnore file of the solution ! I hope this could help.

    It could be related to:
    Git changes not showing in VS2013 Update 2

    I experienced the same thing in Visual Studio 2013 version 12.0.21005.1 REL, where I would put a test file, hello.cs, in a particular folder and it would show up as “Untracked”, and yet if I put the same file in a different folder, also in the same overall repository folder, it wouldn’t show up anywhere (included, excluded, or untracked).

    It turns out that I had some deep folders with Bootstrap and JQuery that, themselves, had .gitignore and .gitattribute files, and when I simply renamed them to disabled.gitignore and disabled.gitattribute, and then hit the little refresh icon at the top of the Visual Studio Team Explorer pane, all my missing files sprang up again! Yeah!

    It seems like it’s a bug in Visual Studio 2013, and perhaps older versions, because I would have expected the .gitignore files to only have scope within their own folders, but they seem to carry on effect as Visual Studio continues traversing the entire folder hierarchy, and not particularly in alphabetical or depth-first/depth-last sequence!

    I have similar issue and my solution is using of the TortoiseGit. If I want to commit, in section “Not versioned files” TortoiseGit shows me files not matched in .gitignore but added to file system . You can simply check all (if you’d like to add them) and press commit.

    enter image description here

    This is not only one issue with Visual Studio Git. Especially general error messages with no value. Every time I had to switch to the TortoiseGit or to the Git bash to find what Visual Studio Git tool doesn’t like.

    I used to have this issue as well, turned out to be my installed git in windows beeing old. Update it and VS will be able to track and commit git repos once again

    In my case I solved this problem by adding it manually from shell.

    I resolved this by adding a .gitignore file in my local repository at the same level as my .git folder.

    1. In Team Explorer while connected to your Git project, click the drop-down and select Settings
    2. Under Git click Git Settings
      enter image description here
    3. Toward the bottom, under Repository Settings > Ignore File click Add
      enter image description here

    This will create a default .gitignore file for you. This worked for me, but you can also replace then content of the file with the something like what is recommended here:

    Hope this helps somebody!

    Old post, but encountered a new cause to this problem.
    I got it after including a downloaded plugin. The plugin had it’s own .git folder in it, which seemed to interfere with VS’s git.
    After removing the folder, I renamed every non-tracked file then named it back to the original, and VS started adding the + in front of the files indicating they are now tracked…

    I had this issue. Removing from the project and adding it back didn’t work, even when doing commits between each step. I ended having to use Source Tree to write the commit, and the use VS to push it to vsto.

    I’ve experienced the same issue and non of the mentioned solutions helped. I wasn’t able to commit a file in any way to Bitbucket Git repo from VS2015. What I’ve ended up with is I’ve made a change to the file (didn’t save it), staged the file and then commit it. Source Tree also was able to track it as ‘Added’.

    Git Baby is a git and github fan, let's start git clone.