I recently transferred a git repository to a new organization. I ran the following:
git remote set-url origin https://github.com/organizationname/therepo.git
I am successfully pulling/pushing from the new location. But now getting the following errors every time I run a git command:
error: key does not contain a section: repositoryformatversion
error: key does not contain a section: filemode
error: key does not contain a section: bare
error: key does not contain a section: logallrefupdates
error: key does not contain a section: ignorecase
error: key does not contain a section: precomposeunicode
I initially thought it had to do with my config file however those fields are present. The first lines of My /.git/config
file looks like this:
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
In this answer it suggests to check for --get-regex
but I do not see any reference to that in my config or .gitconfig
files. It looks like I have 2 git config files:
/usr/local/git/etc/gitconfig
and:
/Users/chmd/.gitconfig
I tried adding those keys to /Users/chmd/.gitconfig
file with no such luck. What step am I missing to clear out these errors? Based on previous answer and research it seems to be my config, but I'm including those fields in my gitconfig?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…