helpSavannah Administration - Support: sr #107682, deleting a remote branch in git


sr #107682: deleting a remote branch in git

Submitted by:  Nikos Mavrogiannopoulos <nmav>
Submitted on:  Sat May 7 21:34:14 2011  
Category: Source code repositories - developer accessPriority: 5 - Normal
Severity: 3 - NormalStatus: Need Info
Assigned to: Bob Proulx <rwp>Operating System: None
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Wed Apr 26 03:32:09 2017, comment #18:


With no further comments received, I'm closing this item.

- assaf

Assaf Gordon <agn>
Site Administrator
Sat Feb 18 01:15:42 2017, comment #17:

(Picking up an old ticket, about deleting remote branches)

Hello Nikos,

With git-2.10.2 (on the client side),
I'm able to delete branches on savannah's server:

$ git push origin --delete my-other-branch

This will not work for 'master', only for other branches.

Please confirm if it works for you.

- assaf

Assaf Gordon <agn>
Site Administrator
Thu Apr 28 04:31:05 2016, comment #16:

Ah... Okay. This has already been discussed a few times. It is generally in agreement that it is a good thing. But it hasn't been implemented yet. I will find the other ticket number and link it here once found.

Bob Proulx <rwp>
Site AdministratorIn charge of this item.
Tue Apr 26 06:59:12 2016, comment #15:

I add new features in feature branches like "simpler-decoding" in the libtasn1 project. However I cannot fast forward this branch as I rewrite the original patch:

$ git push -f
Total 0 (delta 0), reused 0 (delta 0)
remote: error: denying non-fast-forward refs/heads/simpler-decoding (you should pull first)
To ssh://
! [remote rejected] simpler-decoding -> simpler-decoding (non-fast-forward)
error: failed to push some refs to 'ssh://'

Nor I can delete the branch once it is no longer needed (merged in master).

$ git push origin :simpler-decoding
remote: *** Deleting a branch is not allowed in this repository
remote: error: hook declined to update refs/heads/simpler-decoding
To ssh://
! [remote rejected] simpler-decoding (hook declined)
error: failed to push some refs to 'ssh://'

Nikos Mavrogiannopoulos <nmav>
Mon Apr 25 21:32:06 2016, comment #14:

There is no problem reopening a ticket if there is actually something to do. I read through the ticket and it appeared that the issues had been handled. No?

If not could someone make a summary of the problem? What is the problem and what do people want done?

Bob Proulx <rwp>
Site AdministratorIn charge of this item.
Mon Apr 25 21:19:14 2016, comment #13:

I don't quite understand the reasoning behind the closing of this issue. Was it resolved? Anyway the only way to resolve issues with savanah is by taking projects from it. It sounds harsh but if I cannot delete branches, nor fast forward in git it means I cannot work on feature branches.

Nikos Mavrogiannopoulos <nmav>
Mon Apr 25 00:24:43 2016, comment #12:

It has been two years since more info was requested. None has been provided. I can only assume this has all been handled. Closing.

Bob Proulx <rwp>
Site AdministratorIn charge of this item.
 Spam posted by tanchick
Fri Aug 9 20:45:52 2013, comment #11:

Can we close this out?

John Schmidt <johnschmidt4>
Thu Jul 5 14:28:20 2012, comment #10:

I don't think that fast forward is a good thing. Let's wait until the rep. manager then. Karl hello. I know and I feel guilty for not helping, but I'm really out of time. If helping now and then is acceptable I could, but I cannot really commit into anything at this moment.

Nikos Mavrogiannopoulos <nmav>
Wed Jul 4 22:33:38 2012, comment #9:

Nikos - by the way, if you have any interest in adding another hat to your tasks and helping with savannah administration, that'd surely be welcome.


Adrian Mariano <adrianm>
Tue Jul 3 22:51:19 2012, comment #8:

Soon, coming in the next two months, we'll have a repository manager, so this won't be as much of a problem with git.

In the meantime, I could just disable the nofastforwardcommit stuff, if you'd like.

Michael J. Flickinger <mjflick>
Site Administrator
Tue Jul 3 17:55:46 2012, comment #7:

The issues isn't just a branch. I often need to reorganize delete or replace old branches and the savannah git doesn't allow this stuff. For example I wanted to reset the gnutls_3_0_x branch because it got out-of-sync with master, and this is not possible. Neither a fast forward commit is allowed, nor can I delete the branch to replace it. This is utterly annoying. Also making a typo in the tag cannot be undone (tags cannot be deleted as well).

It would really be nice of deletion was allowed without opening a support request.

btw. It doesn't seem to be an issue with git but rather there is a hook (script) that prevents deletion of branches and tags.

remote: *** Deleting a tag is not allowed in this repository
remote: error: hook declined to update refs/tags/gnutls_3_0_21
To ssh://
! [remote rejected] gnutls_3_0_21 (hook declined)
error: failed to push some refs to 'ssh://'

Nikos Mavrogiannopoulos <nmav>
Tue Jul 3 17:00:20 2012, comment #6:

Branch (finston_0) is now manually deleted. You "should" have been able to delete this yourself, via git, but something (git-wise) was buggy.

I apologize for the delay.

Let me know if it's OK to close this issue now.

Michael J. Flickinger <mjflick>
Site Administrator
Tue Jul 3 07:08:57 2012, comment #5:

Is there any way to help with that? Really it is awkward to wait a year to delete a branch or a tag. Is there any way to help solving it without moving the project out of savanah?

Nikos Mavrogiannopoulos <nmav>
Fri Aug 12 15:57:20 2011, comment #4:

Hello is there any update on the issue?

Nikos Mavrogiannopoulos <nmav>
Mon May 23 16:40:56 2011, comment #3:


Investigating issue.

Michael J. Flickinger <mjflick>
Site Administrator
Mon May 23 06:39:56 2011, comment #2:

It is gnutls. I tried to delete the branch "finston_0".

Sun May 22 23:41:58 2011, comment #1:

This puzzles me.

You should be able to still remove remote branches in git.

I'll need to explore the issue with your repository further.

Which project/branch is this?


Michael J. Flickinger <mjflick>
Site Administrator
Sat May 7 21:34:14 2011, original submission:

The git support page at describes a way to delete a remote branch. However trying to delete using that method displays:
"remote: *** Deleting a branch is not allowed in this repository
remote: error: hook declined to update refs/heads/xxx"

for the gnutls git repository.

Nikos Mavrogiannopoulos <nmav>


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by agn (Posted a comment)
  • -unavailable- added by rwp (Posted a comment)
  • -unavailable- added by tanchick (Posted a comment)
  • -unavailable- added by adrianm (Posted a comment)
  • -unavailable- added by mjflick (Posted a comment)
  • -unavailable- added by nmav (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Apr 26 03:32:09 2017agnOpen/ClosedOpen=>Closed
    Mon Apr 25 21:32:06 2016rwpStatusDone=>Need Info
    Mon Apr 25 00:24:43 2016rwpStatusIn Progress=>Done
      Assigned tomjflick=>rwp
    Mon May 23 16:40:56 2011mjflickStatusNeed Info=>In Progress
    Sun May 22 23:41:58 2011mjflickStatusNone=>Need Info
      Assigned toNone=>mjflick

    Back to the top

    Powered by Savane 3.1-cleanup1