Git Pending Changes - Changed Files ignored .gitignore?

Oct 8, 2011 at 2:39 PM

Hi all, first time poster,

I'm absolutely loving this extension for VS2010.

Although I notice in the (very handy) Git Pending Changes pane, it shows files (such as the .csproj and Web.config files) that I've ignored in the ".gitignore" file.

I'm presuming this should happen automatically, unless I've missed something?

Regards Col

Oct 8, 2011 at 9:29 PM
Edited Oct 8, 2011 at 9:30 PM

Maybe the files have already been committed. You can run git bash to see what status it reports.

If it says the files are modified. You may need to run git rm -r --cached filename

Oct 10, 2011 at 3:09 PM

Thanks for the speedy reply yysun!

I intentionally tried not to add these files because I knew I didn't want them tracked, although I'm relatively inexperienced in Git AND VS2010 so I could have done anything!

I've commited all my changes and even pushed back to a Github repo. Everything looks good, even the file structure on Github has no mention of the VS2010 specific files.

I opened the git bash and run the "git status" command, and interestingly it's found one new untracked file (a .sln.docstates.suo file). And yet in the Git Pending Changes pane, this file, as well as 4 other files such as Web.Config), appear as "New" and all tickable.

I then removed "Web.config" from my .gitignore list, run "git status" in bash and its now correctly showing the two untracked files, making me believe the VS2010 extention is ignore the .gitignore file?

Hope this all makes sense!

Oct 10, 2011 at 9:14 PM

Can you provide a link to Github repo so that I can connect and have a look?

Nov 7, 2011 at 10:37 AM


I have the same problem. I have a .gitignore directly in my git repository. This file seems to work, but I have also a file in my C:\Dokumente und Einstellungen\[Username]\.gitignore (defined in my .gitconfig).

The files in this .global gitignore (executables and suo and files like that) are ignored when I do a normal git commit, but in your plugin, within "pening changes" they are not ignored.

Perhaps that's the problem, is the global .gitignore not used?

My .gitconfig in C:/Dokumente und Einstellungen/[Username]

 name = xxx
 email = xxxx
 autocrlf = true
 excludesfile = C:/Dokumente und Einstellungen/[Username]/.gitignore
 authorsfile = C:/Dokumente und Einstellungen/[Username]/authors.txt


My global .gitignore in C:/Dokumente und Einstellungen/[Username]:

#ignore thumbnails created by windows
#Ignore files build by Visual Studio


Hope you can help, regards ...

Nov 7, 2011 at 7:43 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.