Hi everyone.

Normally if I am tracking a file in a Directory which satisfies one of my
.gitignore rules, I can just add them via "git add foo", and I have no
issues.

For example, let me create a new repo.  I create a directory "lib"
containing file "foo.txt", and a Directory "lib2" with a file "bar.txt". 
I add and commit both files.

Now I create a .gitignore file containing the rule "lib*/".  I modify
lib/foo.txt and lib2/bar.txt.  I do "git status" and I'm informed that
foo.txt and bar.txt are modified.  So far so good.

The following commands work as expected:
 git add lib/foo.txt
 git add lib2/bar.txt

But if I instead do:
  git add lib/foo.txt lib2/bar.txt

I get the following response:
  The following paths are ignored by one of your .gitignore files:
  lib
  lib2

I have verified this behavior in git 1.9.3 and 2.1.0.  Is this desired
behavior or is it a bug?  If it is desired behavior, could someone please
describe the utility to me?

Many thanks for your excellent work

Glen Stark


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to