ls -l
命令。
是否有一种方法可以从命令行模拟此行为?类似于:
git ls-files -l
根据sjas的答案,这对我有用
ls | while read aa
do
git log -1 --format="%ai $aa" "$aa"
done
$ 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
摘自 https://dev59.com/dUbRa4cB1Zd3GeqPzE9e#469238
如果这看起来有些奇怪:
我的SHA1哈希通过.gitconfig
中的core.abbrev=4
缩写为仅包含4位数字。
但也许你在这里有用处:
$ 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
for a in $(git ls-files .); do git log --pretty=format:"%h%x09%an%x09%ad%x09$a" -1 -- "$a"; done
代替? - Chris Stryczynski