简体   繁体   English

Git配置文件错误

[英]Git config file error

I am getting this warming when i run any git command from terminal . 当我从终端运行任何git命令时,我正在变暖。 I thouht it was a permission issue but can't seem to fix. 我想这是一个权限问题,但似乎无法解决。 Can anybody point me to the right direction ? 有人能指出我正确的方向吗? below is the warming and the content of my .config file 下面是我的.config文件的变暖和内容

Innos-MacBook-Pro:turnit_try innomanyo$ git status
warning: unable to access '/Users/innomanyo/.config/git/config': Not a directory
warning: unable to access '/Users/innomanyo/.config/git/config': Not a directory
warning: unable to access '/Users/innomanyo/.config/git/config': Not a directory




Innos-MacBook-Pro:~ innomanyo$ cat .config
# bash completion related
source ~/git-completion.bash
alias gco='git co'
alias gci='git ci'
alias grb='git rb'

-rw-r--r--    1 innomanyo  staff    112 Jul 19 12:09 .config

Your .config file should be a directory. 您的.config文件应为目录。 This is a newish standard location on posix systems for applications data. 这是posix系统上用于应用程序数据的新标准位置。 So you will need to remove this file and replace it with a .config directory. 因此,您将需要删除此文件并将其替换为.config目录。 Looks like what you have should be in .bashrc . 看起来您应该在.bashrc If you do this: 如果您这样做:

cd 
cat .config >> .bashrc
rm .config
mkdir -p .config/git/config

Then you will be back on track and your other applications will be happy as well. 然后,您将回到正轨,您的其他应用程序也将感到满意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM