Hi folks -


I’m trying to follow these directions so that I have a personal branch to work on the virt getting started guide, that is backed up to fedorapeople.  Somehow I’m failing but I don’t know where.


This is what I tried :


  1. git clone --bare https://git.fedorahosted.org/cgit/docs/virtualization-getting-started-guide.git/ virtualization-getting-started-guide.git

  2. cd virtualization-getting-started-guide.git

  3. git branch smccann_virtmanager

  4. git checkout smccann_virtmanager

This gives me the following error: fatal: this operation must be run in a work tree.


Looking that up, it seems I shouldn’t have cloned as --bare.


So I try again….w/o the bare…


  1. git clone  https://git.fedorahosted.org/cgit/docs/virtualization-getting-started-guide.git/ virtualization-getting-started-guide.git

  2. cd virtualization-getting-started-guide.git

  3. git branch smccann_virtmanager

  4. git checkout smccann_virtmanager


this looks better…

  1. touch git-daemon-export-ok (so it’s visible on cgit)


 scp it up to fedorapeople:

  1. scp -r virtualization-getting-started-guide.git/ mccann2@fedorapeople.org:public_git/virtualization-getting-started-guide.git


So far so good. Let’s make a minor edit, add and commit…

  1. (edit Book_Info.xml and build to ensure it works)

  2. git add en-US/Book_Info.xml

  3. git commit -m ‘first commit. Fix Book_Info.xml so it will build’


Now try to push that to fedorapeople:

  1. git remote add fedorapeople mccann2@fedorapeople.org:public_git/virtualization-getting-started-guide.git

  2. git push --mirror fedorapeople

This gets me the following batch of errors:


git push --mirror fedorapeople

Counting objects: 4, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (4/4), done.

Writing objects: 100% (4/4), 394 bytes | 0 bytes/s, done.

Total 4 (delta 3), reused 0 (delta 0)

remote: error: refusing to update checked out branch: refs/heads/smccann_virtmanager

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 mccann2@fedorapeople.org:public_git/virtualization-getting-started-guide.git

! [remote rejected] smccann_virtmanager -> smccann_virtmanager (branch is currently checked out)

error: failed to push some refs to 'mccann2@fedorapeople.org:public_git/virtualization-getting-started-guide.git'


So now I’m lost in some weird catch-22 where --bare is needed for one set of commands, but won’t work for the other.  I’m guessing I’m missing something obvious here… Any clues what that is?

Thanks,
Sandra