Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should be the path of .gitconfig file in linux?

Hello can anyone tell me where the .gitconfig file reside, i mean what is the folder where this file should be stored. I am seeing the linux kernel tutorials from KernelNewbies at stuck where that file should reside. I am following this link http://kernelnewbies.org/FirstKernelPatch and under the heading setup git they tell me to make .gitconfig file now i dont know what should be the path.

like image 992
Sami Avatar asked May 31 '16 19:05

Sami


People also ask

Where should I put .gitconfig file?

gitconfig file in the $HOME directory ( C:\Users\$USER for most people). It also still looks for [path]/etc/gitconfig , although it's relative to the MSys root, which is wherever you decide to install Git on your Windows system when you run the installer.


1 Answers

Your global git configuration is written to ~/.gitconfig.

To override git configuration on a per-project basis, write to path/to/project/.git/config.

However, you don't have to edit configuration files directly. You can set global or local configuration variables on the command line. For example, to set the global user name, use git config --global user.name "your-username".

like image 139
amacrobert Avatar answered Oct 17 '22 10:10

amacrobert