URL: <http://savannah.gnu.org/support/?107718>
Summary: Cannot delete master branch of GIT Project: Savannah Administration Submitted by: mpsuzuki Submitted on: 2011年06月13日 10時10分48秒 Category: None Priority: 5 - Normal Severity: 3 - Normal Status: None Assigned to: None Originator Email: mpsuz...@hiroshima-u.ac.jp Operating System: GNU/Linux Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: 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://mpsuz...@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://mpsuz...@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://mpsuz...@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://mpsuz...@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://mpsuz...@git.sv.gnu.org/srv/git/freetype/freetype2-demos.git' Nothing to say, I can delete non-master branch successfully. $ git push ssh://mpsuz...@git.sv.gnu.org/srv/git/freetype/freetype2-demos.git :master-20110602 To ssh://mpsuz...@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? _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/support/?107718> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/