Git error “fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree”

I usually use Git on my Linux machine, but at work I have to use Windows. I had the same problem when trying to commit the first commit in a Windows environment.

For those still facing this problem, I was able to resolve it as follows:

git commit --allow-empty -n -m "Initial commit."

Leave a Comment