Thread (16 messages) flat view 16 messages, 8 authors, 2016-06-15

Re: git-rerere observations and feature suggestions

From: Jeff King <hidden>
Date: 2016-06-15 22:44:48

On Mon, Jun 23, 2008 at 11:49:06AM +0200, Ingo Molnar wrote:
another git-rerere observation: occasionally it happens that i 
accidentally commit a merge marker into the source code.

That's obviously stupid, and it normally gets found by testing quickly, 
but still it would be a really useful avoid-shoot-self-in-foot feature 
if git-commit could warn about such stupidities of mine.

( and if i could configure git-commit to outright reject a commit like 
  that - i never want to commit lines with <<<<<< or >>>>> markers)
The right place for this is in a pre-commit hook, which can look at what
you are about to commit and decide if it is OK. In fact, the default
pre-commit hook that ships with git performs this exact check. You just
need to turn it on with:

  chmod +x .git/hooks/pre-commit

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help