You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've thought about this a bit and ... I really just don't know what the right path forward here is.
Apple ships some developer tools, like git, into /usr/bin, and just... does weird things to them. Like adding a custom configuration setting that adds behavior that makes sense but... is hard to reason about.
This is strictly better than behavior of many years ago, where they would actually add things to git itself that made it behave in unpredictable ways.
But if you were trying to build some tool, do you try to pay attention to this strange gitconfig, or no? Because other git installations (if you compiled from source, which I do, or if you installed from Homebrew, which a great many developers do) does not pay attention to those files.
This situation similar, but a bit less bad, than the situation on Windows, where at least Git for Windows contributes changes back upstream, and is the canonical choice for git usage.
I don't have a survey here, but I bet that git (as part of the Xcode / developer tools install) is not the most widely used git, I bet that's homebrew's version.
So... what would you want? What should we do in the general case?
My suspicion here is that we should have an opt-in option to read that file if it exists, and that we should not do that by default, but I'm (very) open to arguments.
Found this thread because I was also curious about that "unknown" scope.
Since it's shipped by Apple, can't we just assume those settings are system-scoped? We could initialize a baseline config at /etc/gitconfig, as Git expects, and forget the original file.
I prefer that default behavior, since most people are already using those settings without even realizing it. Unless you're deeply configuring Git or changing your credential helper, you'd probably never notice they're set at the system level (or acting like it).
If it really bothers ppl, we could prompt users during Git installation to accept or reject those settings, then copy them to /etc/gitconfig, and forget the original file as before. I’m not a fan of that, Git is often the first command-line tool new developers install, and making them decide on obscure configuration setups like that can be intimidating/unfriendly.
Activity
ethomson commentedon Sep 18, 2024
Just to be clear - this is the git that comes with Xcode, correct? I know that it's a bit odd.
jeroen commentedon Sep 18, 2024
Technically it comes with the "xcode command line tools" app, which is separate from xcode, but yet it comes from apple.
ethomson commentedon Oct 23, 2024
Thanks. This seems like a thing that we should tackle.
ethomson commentedon Dec 11, 2024
I've thought about this a bit and ... I really just don't know what the right path forward here is.
Apple ships some developer tools, like git, into
/usr/bin, and just... does weird things to them. Like adding a custom configuration setting that adds behavior that makes sense but... is hard to reason about.This is strictly better than behavior of many years ago, where they would actually add things to git itself that made it behave in unpredictable ways.
But if you were trying to build some tool, do you try to pay attention to this strange
gitconfig, or no? Because other git installations (if you compiled from source, which I do, or if you installed from Homebrew, which a great many developers do) does not pay attention to those files.This situation similar, but a bit less bad, than the situation on Windows, where at least Git for Windows contributes changes back upstream, and is the canonical choice for git usage.
I don't have a survey here, but I bet that git (as part of the Xcode / developer tools install) is not the most widely used git, I bet that's homebrew's version.
So... what would you want? What should we do in the general case?
My suspicion here is that we should have an opt-in option to read that file if it exists, and that we should not do that by default, but I'm (very) open to arguments.
Aydin-ab commentedon May 16, 2025
Found this thread because I was also curious about that "unknown" scope.
Since it's shipped by Apple, can't we just assume those settings are system-scoped? We could initialize a baseline config at /etc/gitconfig, as Git expects, and forget the original file.
I prefer that default behavior, since most people are already using those settings without even realizing it. Unless you're deeply configuring Git or changing your credential helper, you'd probably never notice they're set at the system level (or acting like it).
If it really bothers ppl, we could prompt users during Git installation to accept or reject those settings, then copy them to /etc/gitconfig, and forget the original file as before. I’m not a fan of that, Git is often the first command-line tool new developers install, and making them decide on obscure configuration setups like that can be intimidating/unfriendly.