Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 675993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:52:45+00:00 2026-05-14T00:52:45+00:00

I use git for my local work (and love it ever so much), and

  • 0

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 I always end up editing the multitude of commit messages into something 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 squashed commit messages so I don’t have to do all that hacking?

(I use msysgit, if that matters. My editor is Notepad++.)

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:52:45+00:00Added an answer on May 14, 2026 at 12:52 am

    There’s no way (short of hacking the source) to modify the squash message template, I don’t think. However, you have a couple options:

    • Use a git log command to get the shortlist, something like `git log –pretty=”* %s” commit-1..commit-2 to get you your bullets. In linux it’s very possible to do this from within your editor – don’t know how that works with msysgit.

    • Have your editor do the work for you! I don’t know what your editor is, so I can’t really tell you what to do, but it’d certainly be very possible in vim. (The idea being: search for /# This is the .* commit message/, delete a couple lines, keep one, delete up to the next comment)

    Also, it’s not what you want in this case, probably, but in fairly recent versions of git, there’s a fixup identifier that you can use instead of squash – it does the same thing, but it discards the commit message, so if you have one commit with the real message then ten fixes, you can just mark them all fixup and not have to delete their throwaway messages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use git as a local repository against a remote SVN repository.
For personal projects I use Git for SCM, but at work we use TFS.
I want to use git to allow me to work on several features in
How often should you use git-gc? The manual page simply says: Users are encouraged
I frequently use git stash and git stash pop to save and restore changes
I'd like to use git to record all the changes to a file. Is
I'm thinking of asking my students to use git for pair programming. Because student
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move
Use case: A does something on his box and gots stuck. He asks B
Use case: 3rd party application wants to programatically monitor a text file being generated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.