扫码关注官方订阅号
本次git commit -m提交后,能否用什么命令获得提交了哪些文件(文件路径)?
git commit -m
然后能否从什么文件中读出这个更改列表?
# --name-only 只显示文件名 git log --name-only -1 # --pretty=format:"" 格式化commit message 这里什么都不显示 git log --pretty=format:"" -1 # 最终 git log --pretty=format:"" --name-only -1
try this command
git log --oneline --name-only -1
建议使用tig
git show commitid,可以查看提交的详细内容,包括文件名,文件修改内容等等
或者用 git-diff 也行:
git diff --name-only HEAD~1 HEAD
git log --stat
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
try this command
git log --oneline --name-only -1
建议使用tig
git show commitid,可以查看提交的详细内容,包括文件名,文件修改内容等等
或者用 git-diff 也行: