Git显示最近2天内更改的文件 [英] Git show files that were changed in the last 2 days

查看:214
本文介绍了Git显示最近2天内更改的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获得最近两天更改过的所有文件的列表?我知道

How can I have a list with all the files that were changed in the last 2 days? I know about

git log --name-status --since="2 days ago" 

但这会显示ID,日期和提交消息.我需要的只是已更改文件名的列表.

but this will show me ids, dates and commit messages. All I need is the list of the file names which were changed.

使用git可以吗?

推荐答案

git log --pretty=format: --name-only --since="2 days ago"

如果某些文件在多次提交中重复,则可以使用管道对其进行过滤

if some files duplicate in multiple commits, you can use pipe to filter it

git log --pretty=format: --name-only --since="2 days ago" | sort | uniq

这篇关于Git显示最近2天内更改的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆