Last Updated: June 24, 2016
·
129
· ryrych

Displaying git changes with relative date

How to display where was your master branch yesterday?

git show master@{yesterday}

And 2 months ago? Simple!

git show master@{2.months.ago}

The same option can used in git reflog when you need to revert for example the result of git rebase --interactive:

git reflog head@{26.hours.ago}