Search code examples
gitgithubonedrive

fatal: cannot update the ref 'head': unable to append to '.git/logs/head': invalid argument


When trying to commit a project to github, the commits fails with an error: fatal: cannot update the ref 'head': unable to append to '.git/logs/head': invalid argument. This is after properly initialising the directory and having a succesfull first push.

The important part of the fix: I am using OneDrive to keep the files in


Solution

  • The other solution:

    • do not clone anything in a OneDrive-sync'ed folder (as seen here)
    • push / pull as expected from a normal regular folder
    • create at any time a git bundle: it produces one file (representing the full repository content), see also here.

    You can store one file in a backup drive.