Bug in .gitignore handling

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

 



For reasons too upsetting to explain, I have to keep a collection of symlinks inside my tree but outside of git's control, such as

mydir/foo -> ../otherdir/foo

To stop git clean from removing it, I added "foo" to .gitignore

The problem is that I foo appears in build paths inside the tree that I would like git clean to pick up, however the pattern "foo" is applied generally and matches stuff like

mydir/mousetrap/foo/objs

According to the man page, I should be able to change .gitignore to "foo/" to stop it from looking recursively, but that doesn't work, as now git clean -n -f -d wants to remove mydir/foo but not mydir/foo/objs

My desperate attempts "./foo" and "^foo" also didn't work. Please note that this is a vastly simplified version of the real problem, so I can't just use "!mousetrap/foo".

It seems "foo/" _should_ work even though foo isn't a directory.

Thanks
Tommy

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

  Powered by Linux