Re: /* in .gitignore

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

 



Hilco Wijbenga <hilco.wijbenga@xxxxxxxxx> writes:

> Naturally, this behaviour makes perfect sense: "/*" means everything.
> Still, I was wondering whether it might be a good idea to make an
> exception for '.gitignore' itself? Then if somebody *really* wanted to
> ignore '.gitignore' they could add "/.gitignore" to '.gitignore'?

If somebody is sick enough to ignore "everything", he can add "/*"
to the .gitignore file and in order to make sure he knows what he is
doing and he is doing what he thinks is doing, he would check with
"git diff --stat HEAD" etc. before committing, and double check with
"git show --stat" etc. after committing.

".gitignore" (or ".gitattributes" for that matter) shouldn't be any
different from your ordinary tracked contents.  If you have "*.o" in
the ignored pattern list, you would need an extra care to defeat the
pattern to add vendor-supplied binary-only object file with "add -f"
and live with the fact that a new vendor-supplied binary-only object
file not appearing on untracked list.  It is exactly the same deal.

Having said that, I guess you could add "!.git*" to your
$GIT_DIR/info/exclude and see if it gives an improved user
experience.

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


[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]