Git ls date files?

In GitHub, you have this nice feature on every page of folders, it shows the file name along with the age of the last commit of this file. This is similar to the ls -l .

Is there a way to reproduce this behavior from the command line? Sort of

 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 
+6
source share
1 answer
 $ 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 fooobar.com/questions/26941 / ...

In case it looks weird:
My SHA1 is reduced to 4 numbers via core.abbrev=4 in my .gitconfig .

But maybe you are using 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 
+3
source

Source: https://habr.com/ru/post/921294/


All Articles