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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to