git/list[1] front-page[2] threads[3] people[4] search[5] about
 

protect branches against deletion from remote

From
HMHenning Moll <newsscott@gmx.de>
Date
Mar 14, 2015, 18:28 UTC
Message-ID
<55047DD8.703@gmx.de>
Hi,

If you try to delete a local branch "feature" which is not merged into another branch, you will get the following warning:

. error: The branch 'feature' is not fully merged. . If you are sure you want to delete it, run 'git branch -D feature'.

If a local branch is worth to be protected in such a way, why not the remote tracking one:

$ git push origin :feature
no warning, just deleted.

Well i can set "receive.denyDeletes" on the remote repository, but this completely removes the ability to delete remote branches.

How to achieve a similar behavior as with local branches?

(BTW. with "git push . :feature" it is also possible to force deletion of local, unmerged branches)

Best regards Henning

Message 1 of 1 in “protect branches against deletion from remote”
  1. Henning MollMar 14, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.