How to locate the git config file in Mac

GitMacos

Git 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:

  1. 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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionlakshmenView Question on Stackoverflow
Solution 1 - GitcdhowieView Answer on Stackoverflow
Solution 2 - GitbpedrosoView Answer on Stackoverflow
Solution 3 - Gituser3718742View Answer on Stackoverflow
Solution 4 - GitAnkit TannaView Answer on Stackoverflow