In the past I’ve blogged about checking out branches created on a specific date as well as sorting git branches by date, but one frequent usage of and dates is checking out a commit at a given time in the past. For example, I often say “Weird, this feature was working a month ago” or “We removed that UI two ago, how did it look again?”. I don’t care about the branch to the change, I just want to go back a given and see something.

The following git command allows you the commit closest to the given date and time:

git checkout 'master@{2018-09-01 01:00:00}'

This command is incredibly useful — I use it almost daily!

  • Introducing MooTools Templated

    One major problem with creating UI components with the MooTools JavaScript framework is that there isn’t a great way of allowing customization of template and ease of node creation. As of today, there are two ways of creating: new Element Madness The first way to create UI-driven…

  • 5 HTML5 APIs You Didn’t Know Existed

    When you say or read “HTML5”, you half expect exotic dancers and unicorns to walk into the room to the tune of “I’m Sexy and I Know It.”  Can you blame us though?  We watched the fundamental APIs stagnate for so long that a basic feature…

  • Scrolling “Agree to Terms” Component with MooTools ScrollSpy
  • CSS Kwicks

    One of the effects that made me excited about client side and JavaScript was the Kwicks effect.  Take a list of items and react to them accordingly when hovered.  Simple, sweet.  The effect was originally created with JavaScript but come five years later, our…



Source link
thanks you RSS link
( https://davidwalsh.name/git-checkout-at-previous-timeframe)

LEAVE A REPLY

Please enter your comment!
Please enter your name here