git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* gitignore + commit with excludes = bug
@ 2021-05-01 18:37 Paul Jackson
  2021-05-04 12:55 ` Philip Oakley
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Jackson @ 2021-05-01 18:37 UTC (permalink / raw)
  To: git

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".

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-11  2:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 18:37 gitignore + commit with excludes = bug Paul Jackson
2021-05-04 12:55 ` Philip Oakley
2021-05-04 14:06   ` Matheus Tavares
2021-05-09  6:21     ` Paul Jackson
2021-05-10 16:20       ` Philip Oakley
2021-05-10 19:27     ` Elijah Newren
2021-05-10 19:37       ` Matheus Tavares Bernardino
2021-05-10 22:34         ` Elijah Newren
2021-05-11  2:23           ` Matheus Tavares Bernardino

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).