[英]GIT: see file list and their versions
How to list the files in current directory along with their versions?? 如何列出当前目录中的文件及其版本?
ie I want to see something like this: 即我想看这样的事情:
foo.c @ cdc8bc8
Makefile @ ab93df1
foo.h @ 92af931
您可以使用git log
或gitk
查看文件的历史记录。
This will get you close, but I'm not sure there's a way to do exactly what you want... 这会让您接近,但我不确定是否有一种方法可以完全按照您的意愿进行...
git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
This is from an article of must have git aliases - check that page out - a bunch of cool examples. 这是来自必须具有git别名的文章-检查该页面-一些很棒的示例。
For all the files in the current directory: 对于当前目录中的所有文件:
git log --stat .
For just a particular file: 对于特定文件:
git log -- myfile.txt
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.