Posted by & filed under QGIS.

Here is a quick handy tip if you are using GIT and want to be able to quickly diff or checkout the code base from a week, month etc. ago.

You can use the git reflog to do this:

@{1.hour.ago}
@{1.minute.ago}
@{1.hour.ago}
@{1.day.ago}
@{yesterday}
@{1.week.ago}
@{1.month.ago}
@{1.year.ago}

So for example to enter a detached state showing the code as it was a week ago do:

git checkout @{1.week.ago}

When you are done, get back to master by doing:

git checkout master

Or if you just want to see a diff between now and a week ago:

git diff @{1.week.ago}

Have fun!

 

Leave a Reply

You must be logged in to post a comment.