I am using a Centos I am looking for my global git config file Could anyone let me know where would I find the file?
2 Answers
you can also find/edit those configuration files running the commands:
git config --global -e git config --system -e git config --local -e
-
1Assuming it's not the case that the whole reason you need to know the file location is that your
core.editor
value is broken... :)– ErikEOct 4, 2017 at 19:26 -
2
-
maybe you want to know where it is to copy paste into a file. maybe to back it up. maybe just to know the file path as you're doing a mass migration and see if it'll match your regex or not. etc. beiong able to edit =/= knowing where it is. Jun 25, 2020 at 17:40
-
@ahnbizcad when you run one of those commands it opens the file inside an editor. The editor usually shows you where the file is located or give you the option to save the contents in another file. But maybe not all editors show you where the file is located. Jun 26, 2020 at 1:12
Typing man git config
has a section called FILES that lists the locations of all the system files. The global Git config file is in ~/.gitconfig
, but there's also a "system" config file, that's usually in /etc/gitconfig
.
-
So it does (on Linux, on OS X it shows the git man page and then the config man page) Aug 26, 2012 at 0:35
-
On CentOS
man git config
shows me thegit
man page, nogit config
s Apr 28, 2014 at 14:37