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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:21:47+00:00 2026-06-08T13:21:47+00:00

On GitHub you have this nice feature on each folder page, it lists the

  • 0

On GitHub you have this nice feature on each folder page, it lists the file name along with the age of the last commit to that file. This is similar to the ls -l command.

Is there a way to mimic this behavior from the command line? Something like

git ls-files -l

Based on sjas answer this works for me

ls | while read aa
do
  git log -1 --format="%ai  $aa" "$aa"
done
  • 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-08T13:21:50+00:00Added an answer on June 8, 2026 at 1:21 pm
    $ for a in $(ls); do git log --pretty=format:"%h%x09%an%x09%ad%x09$a" -1 -- "$a"; done
    e76b    sjas    Tue Jul 24 21:55:20 2012 +0200  bashscripts/
    68af    sjas    Wed Jul 25 13:49:26 2012 +0200  links
    83c9    sjas    Tue Jul 24 15:21:09 2012 +0200  rndm/
    aedf    sjas    Tue Jul 24 15:14:12 2012 +0200  temp/
    a643    sjas    Tue Jul 24 21:48:19 2012 +0200  tips/
    f71d    sjas    Tue Jul 24 19:26:20 2012 +0200  todo
    

    Taken from https://stackoverflow.com/a/469238/805284

    In case this looks strange:
    My SHA1’s are abbreviated to only 4 numbers via core.abbrev=4 in my .gitconfig.

    But maybe you have use for this here:

    $ for a in $(ls); do git log --pretty=format:"%h%x09$a%x09%s" -1 -- "$a"; done
    e76b    bashscripts/   added pushd/popd/dirs shortcuts!!!
    68af    links          fastcommit
    83c9    rndm/          further cleanup
    aedf    temp/          tempcommit
    a643    tips/          added disk usage script and pushd/popd annotation
    f71d    todo           fastcommit
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this file. let's say x for this example inside folder y .
I have this build.xml file http://gist.github.com/315109 . Every task runs smoothly, but test .
I have added this fix https://gist.github.com/2382288 for protect all fields against mass assignment in
I have a question with this project https://github.com/sephiroth74/AndroidWheel .. I have found more questions
I have tryed to run this code in my console: script/plugin install git://github.com/apotonick/cells.git ...but
I have my dot files in Github publicly. This means that I have only
I have repository on GitHub to which I commit regularly from my local computer.
I am using this very nice LinkedIn ruby gem (https://github.com/pengwynn/linkedin) for a project of
A VERY nice to have would be if I could edit object-literals in this
I'm using Github, and realized they have a nice little api for accessing repo

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.