Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 
like image 513
Roger Avatar asked Jan 05 '10 22:01

Roger


People also ask

Which command is used to check last 5 commits?

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 .

Which command gets the list of commits made in the last 2 weeks?

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.

How do I get a list of all commits?

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.

How do I see all commit history?

`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.


2 Answers

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.

like image 84
John Feminella Avatar answered Oct 12 '22 14:10

John Feminella


Git supports searching based on the author as well

git log --since=5.days --author=Roger 
like image 33
Paul McMahon Avatar answered Oct 12 '22 13:10

Paul McMahon