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 8356651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:15:05+00:00 2026-06-09T10:15:05+00:00

I’m using msys git and one thing I’ve noticed is that when I am

  • 0

I’m using msys git and one thing I’ve noticed is that when I am in vi and I write a commit message that contains two or more linefeeds that when it is actually committed there will only be a single linefeed.

If I write this:

my first commit

Hello out there from the first line.


Hello out there from two linefeeds below.

It will be committed as:

my first commit

Hello out there from the first line.

Hello out there from two linefeeds below.

Does anyone using msys git notice this and how can I stop it from happening?

git version 1.7.10.msysgit.1

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-06-09T10:15:06+00:00Added an answer on June 9, 2026 at 10:15 am

    If you look at pretty.c (in charge of format_commit_item() function), it seems that is the norm for commit messages.

    The first empty line is for separating the header from the body of the commit message.
    All other linefeeds are grouped into no more than one empty line, probably because those commits can be send in email, and the reviewers don’t wish to see the newlines used and abused, making said emails excessively long to scroll through.


    The OP test confirms this used to be possible in previous versions of msysgit:

    Alright I did some testing in a VM and found Git-1.7.7-preview20111014.exe if I install it and then goto Git GUI and open my repo and I file a commit, I can make multiple linefeeds without the consolidation.
    I wish they’d bring that back, I need it! –

    Now, Git-1.7.7-preview20111014 means commit 81143a87 (2011-10-14T06:04:08-07:00), which means pretty.c was in that state (commit f67d2e82d6).
    Since then, it (pretty.c) has evolved mainly to parse the commit signature, without visible effect on the format_commit_item() function.


    I confirm another OP’s finding:

    Even with the latest msysgit (PortableGit-1.7.11-preview20120710), a commit edited in the git gui will keep its linefeeds.
    A commit edited in vi will not.

    d

    You can see that the initial message commit only keep one newline per comment.
    I have to amend it in the git gui in order to put (and keep after commit) multiple newlines.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.