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?
When linking a commit to a Story, you may see "Unknown Author" in the Commit section. This indicates that the email address you used in your GitHub, GitLab, or Bitbucket account doesn't match the email address you used for your Shortcut account. To correct this: Go to Settings > Your Account > Email Addresses.
How to do a git config global edit? The global git config is simply a text file, so it can be edited with whatever text editor you choose. Open, edit global git config, save and close, and the changes will take effect the next time you issue a git command. It's that easy.
Indeed, the problem is in .git/config
. You probably edited it and you removed the name of the section by mistake.
The values in Git config file are grouped in sections. The name of each section is placed between square brackets on a separate line.
The values you posted (from the beginning of your .git/config
) should stay in the core
section. Make your .git/config
file look like:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With