From: Samuel Williams Date: Tue, 31 Mar 2015 23:29:20 GMT Subject: Trying to push into empty repo, get fatal: bad revision 'HEAD' Message-ID: I have set up a remote repository like so: remote $ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true sharedrepository = 1 worktree = /srv/http/www.site.com [receive] denyNonFastforwards = true denyCurrentBranch = updateInstead This repo is empty by default. When I try to push into it, I get the following: local $ git push --set-upstream production master Counting objects: 29, done. Delta compression using up to 8 threads. Compressing objects: 100% (27/27), done. Writing objects: 100% (29/29), 1.13 MiB | 0 bytes/s, done. Total 29 (delta 3), reused 17 (delta 0) fatal: bad revision 'HEAD' To ssh://remote.net/srv/http/www.site.com ! [remote rejected] master -> master (Working directory has staged changes) error: failed to push some refs to 'ssh://remote.net/srv/http/www.site.com' Is this expected? Am I doing something wrong? Or, is this a bug in Git? I would expect if you push to an empty repo, it would update it (because denyCurrentBranch = updateInstead). Thanks