gitignore + commit with excludes = bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I stumbled upon what I believe is a bug in git.
See the following reproduction steps:

mkdir test
cd test
git init
echo 1 > ignored
echo 1 > not-ignored
echo ignored > .gitignore
git add -A -- ':!ignored' || echo 'ERROR!!!'

In these steps, I ignore the "ignored" file twice - first time in
.gitignore, and second time in the "git add" command. I didn't expect
this to be a problem, but I'm getting the following error message:

The following paths are ignored by one of your .gitignore files:
ignored

It looks as if git thinks I wanted to include, not exclude "ignored"
in "git add".



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux