Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

could not set 'core.repositoryformatversion' to '0'

Tags:

git

github

I am trying to initialize a new git repo. When I execute git init in the target directory I receive the following:

error: chmod on /r/test_file_path/.git/config.lock failed: Invalid argument
fatal: could not set 'core.repositoryformatversion' to '0'

I've never run into this issue before and the solutions i've looked up appear to be odd and disjointed. I've initialized other git repos in this directory before and have never had a problem. Any thoughts what this could be?

like image 612
StormsEdge Avatar asked Oct 15 '25 07:10

StormsEdge


1 Answers

Are the files synced/on your device?

Got the same error when running git in a folder containing "online" files.

After starting OneDrive git worked correctly again.

like image 171
Jesper Hustad Avatar answered Oct 16 '25 21:10

Jesper Hustad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!