Jim Meyering | 2 Jan 2012 17:31
Gravatar

Re: archer.git "master" deletion (+branches cleanup)

Jan Kratochvil wrote:
> Hello Jim,
>
> there was confusion with people trying to checkout "master" from archer.git
> expecting it to do something - but there is no such single branch for Archer.
>
> I tried to delete the "master" branch but I cannot:
>
> $ git push archer :master
> remote: error: By default, deleting the current branch is denied, because the next
> remote: error: 'git clone' won't result in any file checked out,
> causing confusion.
> remote: error:
> remote: error: You can set 'receive.denyDeleteCurrent' configuration variable to
> remote: error: 'warn' or 'ignore' in the remote repository to allow deleting the
> remote: error: current branch, with or without a warning message.
> remote: error:
> remote: error: To squelch this message, you can set it to 'refuse'.
> remote: error: refusing to delete the current branch: refs/heads/master
> To ssh://sourceware.org/git/archer.git
>  ! [remote rejected] master (deletion of the current branch prohibited)
> error: failed to push some refs to 'ssh://sourceware.org/git/archer.git'
>
> Could you please reconfigure it or also even delete the "master" branch there?

Hi Jan,

I've done as the diagnostic suggested and set this:

  $ git --git-dir=/git/archer.git config receive.denyDeleteCurrent warn
(Continue reading)

Jan Kratochvil | 2 Jan 2012 18:59
Picon
Favicon

Re: archer.git "master" deletion (+branches cleanup)

Hi Jim,

On Mon, 02 Jan 2012 17:31:00 +0100, Jim Meyering wrote:
>   $ git --git-dir=/git/archer.git config receive.denyDeleteCurrent warn
> 
> so you should be able to remove "master", now.

Yes, it works OK:

$ git clone git://sourceware.org/git/archer.git archer-master
Initialized empty Git repository in /home/jkratoch/archer-master/.git/
remote: Counting objects: 344047, done.
remote: Compressing objects: 100% (64898/64898), done.
remote: Total 344047 (delta 276969), reused 339573 (delta 273091)
Receiving objects: 100% (344047/344047), 131.11 MiB | 473 KiB/s, done.
Resolving deltas: 100% (276969/276969), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
$ cd archer-master
$ git branch
$ _

Thanks,
Jan


Gmane