Andrew Ardill <> writes:

As a data point, I have seen people add ".gitignore" to their
.gitignore file, as they don't want to share the file.

Right, I've seen that too. It confused the heck out of me. It only lends credence to my point about the docs. Those users want the functionality of a pattern in '$GIT_DIR/info/exclude', but haven't been able to figure it out easily enough. They've just heard about .gitignore, so they're using that. Yes, it's all there in the docs if you read it several times, and you already know what you're looking at, but not in a terribly accessible, best practices, "advice from a smart friend who's been through it all already" kind of way.

... The introduction does specifically mention 'gitignore'
files, but that seems to be due to all the ignore files
($HOME/.config/git/ignore, $GIT_DIR/info/exclude, .gitignore) being
classified as 'gitignore' files.

Yes, the 'gitignore' versus '.gitignore' distinction is hopelessly subtle. It is very easy for a newcomer to think these are exactly the same thing. I certainly did.

Finally, it's a little confusing that one of the files is called 'exclude'.

It would be great to rename it to 'ignore'; $GIT_DIR/info/exclude ->
$GIT_DIR/info/ignore. Is there any reason this shouldn't be done?

Well, yes: semantics. Since they do slightly different things, they should have different names. It makes reference and teaching much easier. In fact, if a renaming were to occur, I would actually prefer even better semantics:

    .gitignore -> .shared-ignore

    $GIT_DIR/info/exclude -> $GIT_DIR/info/local-ignore

These suggested names could perhaps be improved on. But if anything, the names need to be more different, not less. Users should be able to instantly know what a speaker is talking about without having to doublecheck and ask if by "git-ignore", the speaker really meant "git ignore" or "dot-gitignore".


To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to