I am 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
If you're limiting the number of commits to output within a script, you should be kind to others and use the long option, e.g. git log --max-count=5 .
The most basic and powerful tool to do this is the git log command. By default, with no arguments, git log lists the commits made in that repository in reverse chronological order; that is, the most recent commits show up first.
On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.
`git log` command is used to view the commit history and display the necessary information of the git repository. This command displays the latest git commits information in chronological order, and the last commit will be displayed first.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With