I'm using msysgit on Windows 7 x64. I can't figure out how to tell Git to add a lot of files when there are some files that .gitignore might ignore. For example:
- Initialize a git repository.
Create a .gitignore with contents:
*.foo
Create files "test.txt" and "test.foo".
- Try
git add .
When I try this, git complains that test.foo is ignored and I should use -f if I really want to add it. What I'd rather do is add everything but the files that are configured to be ignored. I looked at the git-add documentation and it looks like -A should help; help says, "... and add all untracked files that are not ignored by .gitignore mechanism." No dice, when I try git add -A .
I get the same error. Using -f adds the ignored file, which is not what I want. (The use case is mass-adding files from a VS project after ignoring .suo and other files.)
Is this a problem with the git implementation I'm using, or is there some argument to git-add that I am missing?