git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* protect branches against deletion from remote
@ 2015-03-14 18:28 Henning Moll
  0 siblings, 0 replies; only message in thread
From: Henning Moll @ 2015-03-14 18:28 UTC (permalink / raw
  To: git

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-14 18:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-14 18:28 protect branches against deletion from remote Henning Moll

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).