Recently I had this error message “failed to lock” while trying to push some changes to a remote Git repository.
After some time Googling with no success and then troubleshooting, I realised I was trying to push to branch called “a/b” while the branch “a” existed. This is obviously not supported in Git, since having a branch “a” requires “.git/refs/heads/a” to be a file (containing the current branch head), while having a branch “a/b” requires “.git/refs/head/a” to be a directory.
Advertisement
Filed under: Uncategorized