Skip to content

Bulk ammending commit messages in git

At my job I’m using git-p4 to work locally with some rails code in git and push to perforce. It’s working okay but one issue for me is that we require every commit to perforce to have a code review by someone, and we put the reviewer’s name at the bottom of each commit. For example:

Live changes to histograms
-commonized the histograms views & logic

CR: JamesM

Well when I’m working in the git repo, I don’t know who is going to code review it, so I end up having to add CR: JamesM to several commits. It can be done with rebase -i, but it is several steps per commit. I could use git-notes, but that doesn’t follow the format that we like (it puts Notes: in). Because this is a local repo only, changing the commit history is not a big deal. After some searching I found the way:

git filter-branch --msg-filter 'cat && echo "CR: REVIEWER"' p4/master~1..HEAD

This little beauty will append CR: REVIEWER to all of the commits from the master to the current head (all of the local commits).


  1. We could be just a few years from Tricorder-like diagnosis devices.
    It sells for $249 with a two year contract at Verizon, although you can get it through
    Wirefly. Certainly, the benefit of access these buttons provide to various features is worth a bit of self-training, I

    Monday, July 24, 2017 at 10:10 pm | Permalink
  2. X wrote:

    I was cᥙrious if you ever considered changing the layout of your
    blog? Its very well written; I love what youve got to say.
    But maybe you could a little more in thе way of content so
    people could connect with it better. Youve
    got an awful lot of text for only having 1 or two pictures.

    Maybе you could space it out better?

    Wednesday, July 26, 2017 at 9:12 am | Permalink
  3. Manufacturers create this static imbalance of charges
    on the cell by doping each side of the silicon solar cell with different
    chemicals (e.g. phosphorous on one side and
    boron on the other).

    Tuesday, August 22, 2017 at 10:47 pm | Permalink
  4. What’s up colleagues, its enormous post regarding cultureand completely explained, keep it up
    all the time.

    Thursday, August 31, 2017 at 11:45 am | Permalink
  5. I pay a quick visit day-to-day a few web pages and websites to read
    posts, but this weblog gives quality based nfl jerseys

    Thursday, August 31, 2017 at 10:11 pm | Permalink
  6. hi!,I really like your writing very much! share we be in contact more
    approximately your article on AOL? I need an expert on this house to resolve my problem.
    May be that is you! Taking a look ahead to see you. cheap
    nfl jerseys

    Saturday, September 2, 2017 at 4:15 am | Permalink
  7. Seo Madrid wrote:

    Estaba buscando esa informacion hace espacio, te lo
    agradezco, estoy de concierto con tu punto de vista y pasto igual.

    Despues de buscar mucho por Internet encontre lo que buscaba.
    Genial!!! muchas muchas gracias

    Wednesday, September 6, 2017 at 1:03 pm | Permalink
  8. With havin so much content do you ever run into any issues of plagorism or copyright violation?
    My blog has a lot of completely unique content I’ve either written myself or outsourced but it
    looks like a lot of it is popping it up all over the web without
    my permission. Do you know any techniques to help protect against content from being
    ripped off? I’d really appreciate it.

    Friday, September 15, 2017 at 9:43 am | Permalink
  9. I’m impressed, I must say. Seldom do I come across
    a blog that’s both equally educative and interesting, and let
    me tell you, you have hit the nail on the head. The issue is an issue
    that not enough people are speaking intelligently about.
    I’m very happy that I stumbled across this during my hunt for something concerning ncaa jerseys

    Friday, September 29, 2017 at 1:01 am | Permalink
  10. An impressive share! I have just forwarded this onto a co-worker who had been doing a little
    research on this. And he in fact ordered me dinner due to the fact that I found it for him…
    lol. So let me reword this…. Thanks for the meal!! But yeah, thanks for spending time
    to talk about this topic here on your web nfl jerseys

    Tuesday, October 24, 2017 at 3:20 am | Permalink
  11. fuck women wrote:

    Very good post. I certainly love this website. Keep it up!

    Monday, November 13, 2017 at 9:37 pm | Permalink
  12. florists wrote:

    Oh my goodness! Impressive article dude! Many
    thanks, However I am experiencing troubles with your
    RSS. I don’t know the reason why I am unable to join it.
    Is there anyone else having similar RSS issues?

    Anyone who knows the solution will you kindly respond?

    Friday, December 1, 2017 at 9:59 am | Permalink
  13. Simply wish to say your article is as astounding. The clarity on your post is simply spectacular and that i could suppose you are an expert on this
    subject. Well with your permission allow me to take hold of your RSS feed to keep up
    to date with drawing close post. Thanks one million and please carry on the enjoyable work.

    Tuesday, February 27, 2018 at 10:59 pm | Permalink
  14. Hi there, just was aware of your blog through Google, and found that it’s really informative.
    I am going to watch out for brussels. I will appreciate for
    those who continue this in future. Numerous folks might be benefited out of your writing.

    Friday, May 11, 2018 at 6:00 am | Permalink
  15. June wrote:

    This watch comes with GPS, Mp3 player, and heart fee monitor with a
    chest strap.

    Sunday, May 13, 2018 at 4:04 pm | Permalink
  16. Curtis wrote:

    If you desire to grow your experience just keep visiting this
    web page and be updated with the latest gossip posted here.

    Thursday, July 19, 2018 at 12:30 pm | Permalink
  17. 冰淇淋机 wrote:


    Thursday, February 28, 2019 at 8:44 am | Permalink

3 Trackbacks/Pingbacks

  1. try here on Tuesday, July 25, 2017 at 11:34 pm

    try here

    confabulus › Bulk ammending commit messages in git

  2. this contact form on Wednesday, August 23, 2017 at 1:44 pm

    this contact form

    confabulus › Bulk ammending commit messages in git

  3. on Wednesday, August 23, 2017 at 7:29 pm

    confabulus › Bulk ammending commit messages in git

Post a Comment

Your email is never published nor shared.