Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed red hat openshift tools on CentOS 6.3. Then I checked

git --version

It is already installed, but I don't know whether it was installed before openshift tools or not. I configured git:

git config --global user.name "myname"

Then I wanted to check "visually" whether .gitconfig file is created somewhere in a file system. However, I cannot find where it is. If I issue:

git config --list

it shows my configuration. So can someone explain me where .gitconfig file is and where git/bin directory is.

share|improve this question
add comment

migrated from stackoverflow.com Nov 13 '12 at 8:38

This question came from our site for professional and enthusiast programmers.

4 Answers

up vote 1 down vote accepted

git config --local or git config is per repo config and is found in the repo itself in .git/config

git config --global is per user and can be found in ~/.gitconfig

git config --system is per machine and the .gitconfig file can be found where git looks for it's supporting files.

share|improve this answer
1  
since git v1.7.12, global config (XDG config) can also exist in ~/.config/git/config –  linquize Nov 13 '12 at 7:18
    
thanks for that :) –  adymitruk Nov 14 '12 at 1:17
add comment

Try installing mlocate and do a locate git?

share|improve this answer
    
OP is asking for .gitconfig, not git –  hd1 Nov 13 '12 at 4:32
add comment

It's in ~/.gitconfig here, FWIW.

share|improve this answer
add comment

I was using Nautilus to browse, but the folder/files were hidden. Ctrl+H shows hidden folders and files.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.