mainSavannah Administration - Support: sr #107718, Cannot delete master branch of GIT

 
 

sr #107718: Cannot delete master branch of GIT

Submitter:  suzuki toshiya <mpsuzuki>
Submitted:  Mon 13 Jun 2011 10:10:48 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  mjflick
Operating System:  GNU/Linux Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 29 Nov 2011 04:05:55 AM UTC, comment #5: 

Dear Michael,

Thank you very much for caring this issue,
please disable non-fast-forward commit.

suzuki toshiya <mpsuzuki>
Sat 26 Nov 2011 05:19:19 PM UTC, comment #4: 

Temporarily enabled non-fast-forward commits, so you can make this change.

Please let me know when I can disable them again.

Michael J. Flickinger <mjflick>
Mon 27 Jun 2011 01:45:22 AM UTC, comment #3: 

Describing the reason in detail; I committed a changeset with
invalid/unreachable E-mail address to the master repository,
and I want to cancel and rework the changeset with correct
E-mail address.
Because git service of savannah does not allow non-fast-forward
commit (regardless with master or non-master branch), the
deletion of  the master branch is expected.

suzuki toshiya <mpsuzuki>
Sat 25 Jun 2011 05:26:59 PM UTC, comment #2: 

Hi,

Would you mind specifying the exact reason you need a reset for the repository?

Generally, we don't just delete master branches for any version control system.

Michael J. Flickinger <mjflick>
Tue 14 Jun 2011 12:59:27 AM UTC, comment #1: 

I heard that the master branch of GIt cannot be
removed, on savannah. I ask for resetting
freetype/freetype2-demos.git repository,
is it possible?

suzuki toshiya <mpsuzuki>
Mon 13 Jun 2011 10:10:48 AM UTC, original submission:  

Hi,
Thank you for efforts to maintain the savannah website.

I have a difficulty in the canceling of wrong commit in
the master branch of GIT. The support request #107682
looks similar, but I think my trouble is only for master
branch, so I submit another request.

I had pushed a wrong commit by my mistake, and trying to cancel it.

For first, I make a backup branch without my mistake as:
$ git clone ssh://mpsuzuki@git.sv.gnu.org/srv/git/freetype/freetype2-demos.git
$ git checkout HEAD^ # rewind before my mistake
$ git branch master-20110602
$ git checkout master-20110602
$ git push ssh://mpsuzuki@git.sv.gnu.org/srv/git/freetype/freetype2-demos.git master-20110602 :master-20110602

Then, I try to delete the master branch including my mistake as:
$ git push ssh://mpsuzuki@git.sv.gnu.org/srv/git/freetype/freetype2-demos.git :master
But I got the message that current branch cannot be removed
because it is protected by the configuration in the remote server
side.

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://mpsuzuki@git.sv.gnu.org/srv/git/freetype/freetype2-demos.git
 ! [remote rejected] master (deletion of the current branch prohibited)
error: failed to push some refs to 'ssh://mpsuzuki@git.sv.gnu.org/srv/git/freetype/freetype2-demos.git'

Nothing to say, I can delete non-master branch successfully.
$ git push ssh://mpsuzuki@git.sv.gnu.org/srv/git/freetype/freetype2-demos.git :master-20110602
To ssh://mpsuzuki@git.sv.gnu.org/srv/git/freetype/freetype2-demos.git
 - [deleted]         master-20110602

I think "deny the request to remove master branch" is safe configuration, but I wish if the project administrator can
change the switch. Is there any method to change the switch?
Or, is there any better method to cancel wrong commit from
the master branch of GIT?

suzuki toshiya <mpsuzuki>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mjflick (Posted a comment)
  • -email is unavailable- added by mpsuzuki (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-01-01 mjflick StatusNeed Info Done
        Open/ClosedOpen Closed
    2011-06-25 mjflick StatusNone Need Info
        Assigned toNone mjflick

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code