开发者

get all the commits done by me in the last 5 days in git

开发者 https://www.devze.com 2022-12-15 08:22 出处:网络
I am开发者_JAVA技巧 not very good at sed or awk. Every friday I\'d like to see all the commits done by me in the last 5 days, to find out what work I did.

I am开发者_JAVA技巧 not very good at sed or awk. Every friday I'd like to see all the commits done by me in the last 5 days, to find out what work I did.

At this time the only command I know of is

git log --since=5.days


Try git log --since=5.days --author=roger, assuming that roger is your username.

--author actually accepts a regular expression, so if you wanted to find either roger or rachel's commits, you could do git log --since=5.days --author="r(oger|achel)".

If you want to search on any branch and not just the current one, then also add --all.


Git supports searching based on the author as well

git log --since=5.days --author=Roger


To limit commits to yourself, pass the --author flag to git log, as in git log --since=5.days --author='Your Name'.

If you want less information than the git log default output, you can play around with the formatting options a bit. git log --since=5.days --oneline will show you a one-line summary of each commit from the past 5 days (the one-line summary will contain the abbreviated SHA1 hash of the commit as well as the first line of the log message). Or git log --since=5.days --format=%H will show only the full SHA1 hash of the commits from the past 5 days.

0

精彩评论

暂无评论...
验证码 换一张
取 消