On 2024-11-24 at 11:10:57, Homyee King wrote: > 13 years ago, Todd Rinaldo found that —exclude option is not works > with any options, for example, `git clean -Xd -e=foo` to clean the > files/folders respect the .gitignore rule except the foo, but in real > world, git only respect the git ignore standard rule and not work with > -e option. > > Today, 13 years later, the problem still exist, so I wonder is this a > bug or should we clarify the “correct” usage of exclude in > documentation, because it’s really confusing. I don't think this is the right syntax. For example, I did this in my checkout of the Git project: ---- $ touch foo $ git clean -n Would remove foo $ git clean -n -e foo $ git clean -f -e foo $ ls foo foo ---- When you use a short option, you don't specify the equals sign. So you can write `-e foo`, `-efoo`, `--exclude foo`, or `--exclude=foo`. However, `-e=foo` is equivalent to `-e =foo`, which ignores `=foo`. -- brian m. carlson (they/them or he/him) Toronto, Ontario, CA
Attachment:
signature.asc
Description: PGP signature