git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Indelible actions only
@ 2011-06-28 22:18 Walther Bauer
  2011-06-28 22:45 ` Carlos Martín Nieto
  0 siblings, 1 reply; 2+ messages in thread
From: Walther Bauer @ 2011-06-28 22:18 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Indelible actions only
  2011-06-28 22:18 Indelible actions only Walther Bauer
@ 2011-06-28 22:45 ` Carlos Martín Nieto
  0 siblings, 0 replies; 2+ messages in thread
From: Carlos Martín Nieto @ 2011-06-28 22:45 UTC (permalink / raw)
  To: Walther Bauer; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-28 22:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-28 22:18 Indelible actions only Walther Bauer
2011-06-28 22:45 ` Carlos Martín Nieto

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 NNTP newsgroup(s).