Include missing files in Git repository using Visual Studio

When using Visual Studio as your source control, you notice that some time some files are not getting checked into source control provider. Those files are part of your project but not checked in. So when you get latest version of your solution files from another machine those files show up as broken links in project. Your project still has reference to those files but files are not physically present on your machine. If you use Team Foundation Server as your source control provider, you can simply right click on those files in Visual Studio (from machine where files were originally created) and choose the option of checking in.

If you are using GIT as your source control provider, you will notice that option of checking in files is not there. GIT provider and add-ons do things little differently. These files show up under Untracked files sections in Team tab. Right click on the files, you want to check in, and choose Add option. Now the files will move into Included files section. From there you can simply follow your Commit and Sync process to check in the files. Following screenshot shows how these sections look like in Team tab.

Visual Studion Git Untracked Files




25.4 °C / 77.6 °F

weather conditions Clouds

Monthly Posts

Blog Tags