Fullybaked-logo

fullybaked | davebaker

I'm a developer living in the UK and when I'm not spending time with my wife and our 2 wonderful little boys, I love hacking around with code

I'm passionate about technology, web development, gaming and fencing

5 March 2013

Retrieve a given period of logs from Git

Just the other day I needed to find out if we were messing around with some code in our codebase at a certain date where a bug appears to have been introduced.

To start this process I wanted to grab a snapshot of just that weeks commits and work backwards from there

In case you haven't come across it, here is the commands used to pull out a range of dates from the commit log

git log --since 2012/09/14 --until 2012/09/21 \
--oneline >> gitlog.txt

The --since and --until commands allow you to provide a date range which will be displayed.

--oneline is how I prefer to quickly parse the logs, and for those less familiar with the command line, the >> gitlog.txt streams the output from the git log command into a text file in the current directory instead of the terminal via STDOUT.