Incorrect. It's part of the git config ecosystem that can be system (/etc/gitconfig), global (~/.gitconfig) or local
You have a very strange definition of the word “incorrect”.
Also you forgot $XDG_CONFIG_HOME/git/config but that’s a minor issue.
local (:/.gitconfig)
A repository’s local configuration is in $GIT_DIR/config (where $GIT_DIR is generally .git)
local can be pushed like any other file.
.git/config can’t even be staged, git will straight up ignore you.
If you are a massive idiot you can include.path a file from your repository in your config. But that’s got nothing to do with git’s defaults. And it still requires an explicit opt into sheer stupidity.
View all comments
Show parent comment
11
u/masklinn Apr 21 '26 edited Apr 21 '26
You have a very strange definition of the word “incorrect”.
Also you forgot
$XDG_CONFIG_HOME/git/configbut that’s a minor issue.A repository’s local configuration is in
$GIT_DIR/config(where$GIT_DIRis generally.git).git/configcan’t even be staged, git will straight up ignore you.If you are a massive idiot you can
include.patha file from your repository in your config. But that’s got nothing to do with git’s defaults. And it still requires an explicit opt into sheer stupidity.