Why can’t I merge into a bare repo? Bare repos don’t have a HEAD or a working tree. In the config file we can see bare=true.
You also can’t pull in a bare repo (because pull = fetch & merge and merge doesn't work). However, you can push to a bare repo – why? As far as I know, push also contains a merge, but in this case we can do it well.
So, the question could be “how does git merge work?”. Why does it need a HEAD? What is it doing when merging?
 
     
    