How do I customize the format of git rebase --interactive commit messages?

Posted by adamjford on Stack Overflow See other posts from Stack Overflow or by adamjford
Published on 2010-03-19T22:18:43Z Indexed on 2010/03/19 22:21 UTC
Read the original article Hit count: 150

Filed under:
|

Hi everyone,

I use git for my local work (and love it ever so much), and I follow a workflow similar to the one described in this article. So basically, when starting on a new feature, I create a branch for it, go through the usual hack then commit cycle, and when I think I'm done with it, I squash it into a single commit using git rebase --interactive master, and these squashed commit messages always end up looking like the example in the article, reproduced here:

[#3275] User Can Add A Comment To a Post

* Adding Comment model, migrations, spec
* Adding Comment controller, helper, spec
* Adding Comment relationship with Post
* Comment belongs to a User
* Comment form on Post show page

Of course, that's after a bunch of removing # This is the xth commit message lines and copy/pasting * in front of each commit message.

Now, what I was wondering, is there any way to customize how git rebase -i outputs the merged commit messages so I don't have to do all that hacking?

(I use msysgit, if that matters.)

Thanks!

© Stack Overflow or respective owner

Related posts about git

Related posts about msysgit