How to locate the git config file in Mac
GitMacosGit Problem Overview
As title reads, how to locate the git config file in Mac? Not sure how to find it. Need to set
git config --global http.postBuffer 524288000
Need some guidance on finding it..
Git Solutions
Solution 1 - Git
The global Git configuration file is stored at $HOME/.gitconfig
on all platforms.
However, you can simply open a terminal and execute git config
, which will write the appropriate changes to this file. You shouldn't need to manually tweak .gitconfig
, unless you particularly want to.
Solution 2 - Git
You don't need to find the file.
Only write this instruction on terminal:
git config --global --edit
Solution 3 - Git
I use this function which is saved in .bash_profile and it works a treat for me.
function show_hidden () {
{ defaults write com.apple.finder AppleShowAllFiles $1; killall -HUP Finder; }
}
How to use:
show_hidden true|false
Solution 4 - Git
The solution to the problem is:
-
Find the .gitconfig file
[user]
name = 1wQasdTeedFrsweXcs234saS56Scxs5423
email = [email protected]
[credential]
helper = osxkeychain
[url ""]
insteadOf = git://
[url "https://"]
[url "https://"]
insteadOf = git://
there would be a blank url="" replace it with url="https://"
[user]
name = 1wQasdTeedFrsweXcs234saS56Scxs5423
email = [email protected]
[credential]
helper = osxkeychain
[url "https://"]
insteadOf = git://
[url "https://"]
[url "https://"]
insteadOf = git://
This will work :)
Happy Bower-ing