如标题所述,如何在Mac中找到git配置文件?不确定如何查找。需要设置。
git config --global http.postBuffer 524288000
需要一些关于查找它的指导...
全球 Git 配置文件存储在所有平台上的 $HOME/.gitconfig
。
但是,您可以简单地打开终端并执行 git config
,这将向该文件写入适当的更改。除非您特别想要这样做,否则不应手动调整 .gitconfig
。
echo $HOME
。 - cdhowie~/.config/git/config
。 - Artem您不需要找到这个文件。
只需在终端上输入以下指令:
git config --global --edit
git config --system --edit
来查找系统配置文件的位置,在我的情况下是在/usr/local/etc/gitconfig
中。我以前不知道要去那里找。(在vim中打开文件,然后输入1
,接着按下control + g
可以显示文件路径) - Toutengit config --global core.editor "your-editor"
命令,就像在 git 文档 中所说的那样。之后,git config --global --edit
命令将会在你的代码编辑器中打开 .gitconfig
文件。 - Denkhis我使用保存在.bash_profile中的这个函数,对我非常有效。
function show_hidden () {
{ defaults write com.apple.finder AppleShowAllFiles $1; killall -HUP Finder; }
}
show_hidden true|false
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
和alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
**。然后在控制台中输入showFiles
或hideFiles
即可使用。 - DaddyMoe[user]
name = 1wQasdTeedFrsweXcs234saS56Scxs5423
email = ankittanna@hotmail.com
[credential]
helper = osxkeychain
[url "https://"]
insteadOf = git://
[url "https://"]
[url "https://"]
insteadOf = git://
system
、global
、local
、worktree
和file
。请查看 GitLab 文档中的此链接 https://git-scm.com/docs/git-config#FILES。 - Touten