Indelible actions only

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Indelible actions only

From: Walther Bauer <hidden>
Date: 2016-06-15 22:51:31

Hello,
how do I configure a git repository in a way, that no modifications of
existing history (eg "commit --amend", "branch -d", "rebase") are
allowed?
Regards, walther

Re: Indelible actions only

From: Carlos Martín Nieto <hidden>
Date: 2016-06-15 22:51:31

On Wed, Jun 29, 2011 at 12:18:36AM +0200, Walther Bauer wrote:
Hello,
how do I configure a git repository in a way, that no modifications of
existing history (eg "commit --amend", "branch -d", "rebase") are
allowed?
From the git-config man page

       receive.denyNonFastForwards
           If set to true, git-receive-pack will deny a ref update which is
           not a fast-forward. Use this to prevent such an update via a push,
           even if that push is forced. This configuration variable is set
           when initializing a shared repository.


so set that variable to true. This has to be in the repository you use
to synchronize. IIRC it can't be avoided locally (but that's not a
problem, because you shouldn't be working directly on the public repo
anyway).

Cheers,
   cmn
-- 
Carlos Martín Nieto | http://cmartin.tk

"¿Cómo voy a decir bobadas si soy mudo?" -- CACHAI
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help