threads / discuss / 14031

Question: git commit -v uncomment Changes to be commited

Subject: Question: git commit -v uncomment Changes to be commited

## tl;dr

2 messages between Jun 19, 2008 and Jun 19, 2008.

replies: 1people: 2as markdown or json

mike.gaffney· Jun 19, 2008, 03:04 UTC · lore

I find myself always uncommenting the "Changes to be commited:" section on a git commit -v. Other than a nifty regex with vi, I'm wondering if there is a way to customize the unified diff that is created with commit -v. I've looked through the list, but it is one of those things where I don't really know how to ask the question (phrase the search). I would be glad of any help that people could give me.

Thanks,
   Mike Gaffney
Olivier Marin· Jun 19, 2008, 10:08 UTC · re: mike.gaffney · lore

Re: Question: git commit -v uncomment Changes to be commited

mike.gaffney a écrit :
Show 6 quoted lines
> I find myself always uncommenting the "Changes to be commited:" section
> on a git commit -v. Other than a nifty regex with vi, I'm wondering if
> there is a way to customize the unified diff that is created with commit
> -v. I've looked through the list, but it is one of those things where I
> don't really know how to ask the question (phrase the search). I would
> be glad of any help that people could give me.

You probably want to edit the hook .git/hooks/prepare-commit-msg in your repository. Don't forget to enable it with chmod +x.

More information at:
  http://www.kernel.org/pub/software/scm/git/docs/githooks.html
Olivier.

← back to recent threads