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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:25:44+00:00 2026-05-28T17:25:44+00:00

I’m following the git tutorial at gitimmersion.com and set up an alias hist to

  • 0

I’m following the git tutorial at gitimmersion.com and set up an alias hist to show a custom pretty log output.

When I disable git’s pager (setting GIT_PAGER to nothing or to cat), the output omits the newline at the end.

Here’s what I see:

work/lab_10$ git hist
* 88976c6 2011-01-19 | Added a comment (HEAD, v1, master) [Jim Weirich]
* b819ef8 2011-01-19 | Added a default value (v1-beta) [Jim Weirich]
* ff07fc9 2011-01-19 | Using ARGV [Jim Weirich]
* b73dc5c 2011-01-19 | First Commit [Jim Weirich]work/lab_10$

Notice that the shell prompt shows up after the last character of printable output, with no newline.

To compare, here’s what I see when using a standard pretty format:

work/lab_10$ git log --pretty=oneline
88976c644e65afa697b58fc940eb8f94c47f8129 Added a comment
b819ef832effdaea8c0e33b1fea36ea4071c61b9 Added a default value
ff07fc93d3e2e5522e5607c9952cbad10cfa1144 Using ARGV
b73dc5c1579756f4e9a4f91a90384c47288023b0 First Commit
work/lab_10$ 

In this case, the newline prior to the next prompt appears.

Here’s the definition of the alias:

[alias]
  hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short

Is there a way to tell git log to include the final newline when I’m not using a pager?

  • 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-28T17:25:45+00:00Added an answer on May 28, 2026 at 5:25 pm

    Try

    hist = log --pretty="tformat:\"%h %ad | %s%d [%an]\"" --graph --date=short
    

    format places newlines between commits, tformat places newlines after each commit, thus also after the last one.

    See git-log(1) for details.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
Basically, what I'm trying to create is a page of div tags, each has
I want to count how many characters a certain string has in PHP, but

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.