git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Trying to push into empty repo, get fatal: bad revision 'HEAD'
@ 2015-03-31 23:29 Samuel Williams
  2015-04-01  0:00 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Samuel Williams @ 2015-03-31 23:29 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-02  5:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 23:29 Trying to push into empty repo, get fatal: bad revision 'HEAD' Samuel Williams
2015-04-01  0:00 ` Junio C Hamano
2015-04-01  1:36   ` Junio C Hamano
2015-04-01  6:15     ` Junio C Hamano
2015-04-01  8:51     ` Johannes Schindelin
2015-04-01 18:00       ` Junio C Hamano
2015-04-02  5:07         ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).