[jboss-as7-dev] Help with git push ssh:...
Scott Stark
sstark at redhat.com
Sun Mar 27 14:41:22 EDT 2011
So I'm trying to use the "Pushing changes to a public repository"
proceedure from the git book, but run into the following error. Note
that I did not first export the repository as a bare one as described
earlier as I missed that. I just scpd the entire repo/workspace over to
this box, did the JBAS-9151 work, and wanted to push that out to the copy.
[191](ironmaiden:jboss-as) > git push
root at ec2-174-129-102-73.compute-1.amazonaws.com:jboss-as master
Counting objects: 692, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (191/191), done.
Writing objects: 100% (537/537), 91.39 KiB, done.
Total 537 (delta 205), reused 476 (delta 174)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare
repository
remote: error: is denied, because it will make the index and work tree
inconsistent
remote: error: with what you pushed, and will require 'git reset --hard'
to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration
variable t
remote: error: 'ignore' or 'warn' in the remote repository to allow
pushing int
remote: error: its current branch; however, this is not recommended
unless you
remote: error: arranged to update its work tree to match what you pushed
in som
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default
behaviour, se
remote: error: 'receive.denyCurrentBranch' configuration variable to
'refuse'.
To root at ec2-174-129-102-73.compute-1.amazonaws.com:jboss-as
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to
'root at ec2-174-129-102-73.compute-1.amazonaws.com:jboss-as'
The status of the remote repo is:
[root at ip-10-78-94-50 jboss-as]# git status
# On branch master
# Your branch is ahead of 'origin/master' by 1715 commits.
#
nothing to commit (working directory clean)
[root at ip-10-78-94-50 jboss-as]#
I'll go through and re-export the local repo as a bare one and see if
that works, but would setting receive.denyCurrentBranch=ignore or warn
allow me to just update the remote repo for local use only? I'll never
push or pull anything from it.
More information about the jboss-as7-dev
mailing list