问题描述
本次git commit -m提交后,能否用什么命令获得提交了哪些文件(文件路径)?
然后能否从什么文件中读出这个更改列表?
问题解答
回答1:# --name-only 只显示文件名 git log --name-only -1# --pretty=format:'' 格式化commit message 这里什么都不显示git log --pretty=format:'' -1# 最终git log --pretty=format:'' --name-only -1回答2:
try this command
git log --oneline --name-only -1
回答3:建议使用tig
回答4:git show commitid,可以查看提交的详细内容,包括文件名,文件修改内容等等
回答5:或者用 git-diff 也行:
git diff --name-only HEAD~1 HEAD回答6:
git log --stat

