1

I know that git (as of 1.8.2) will ignore entire directories (e.g. "bin") at any level using a .gitignore file (in the root directory) that contains something like:

bin/

However, that doesn't seem to work for:

.vs/

Is there special syntax for directories that begin with "."?

Jess
  • 2,991
  • 3
  • 27
  • 40
  • 1
    Exactly what you say doesn't work works fine for me. Check for typos, or something like that? –  Aug 30 '15 at 22:12
  • `.vs/` should work you can also try `/.vs/` if .vs is in the project root. – Pawel Aug 30 '15 at 22:13
  • 1
    Does your gitignore have any lines for suo files that might unignore it? Or maybe it was already tracked? –  Aug 31 '15 at 06:25
  • This file was already being tracked. Removing it from the repo is what actually resolved it. Thanks for all the comments! – Jess Aug 31 '15 at 15:47

1 Answers1

1

Is there special syntax for directories that begin with "."?

I confirm there is nothing special.

If git ls-files -- .vs/a_file_name returns anything (see "How to tell if a file is git tracked (by shell exit code)?"), then you need, as you have seen, to remove it first:

git rm --cached -r -- .vs/

Then a git status should not bring anything from .vs/

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250