How can i get a list of all the git commits done to the master branch between 2014-01-01 and 2014-06-30?
I know git log
will give me roughly this format (repeated for all commits):
commit <hash> author: <author name> date: <date> <comment>
But how can it be limited to selected dates and a one line per commit format?
<hash> <author> <date> <hash> <author> <date>
In order to see the commit differences between two branches, use the “git log” command and specify the branches that you want to compare. Note that this command won't show you the actual file differences between the two branches but only the commits.
To confirm, you can run git branch . The branch that you are on will be the one with a * next to it. Git checkout might fail with an error message, e.g. if it would overwrite modified files. Git branch should show you the current branch and git log master allows you to view commit logs without changing the branch.
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.
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.
$ git log --since "DEC 1 2014" --until "DEC 5 2014" --pretty=format:"%h %an %ad"
This will give the format you want for the commits between dec 1 2014 and dec 5 2014, you can change the dates as you like
If you wish to change the format, you can read about the options here
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