I am searching for a single git command(if possible) to checkout files from one repository at certain time(i.e. my local branch time).
Scenario: I have checked out Branch1 at a certain time, may be 2 days back(11/12/2015 19:05). I want to checkout another branch i.e. Branch2 of 2 days back(11/12/2015 29:05 i.e. 10 minutes after Branch1 checkout time).
How can I achieve this?
Instead of date I can use unix time stamp if its easier.
If I use "git log -1 --format=%ct
" it will give me the time stamp. Then I can add 10 minutes to this timestamp and use below command to checkout.
git archive --format tar --remote <HUB>:<REPO> master:`dirname <FILEPATH>` | tar -xO <FILE> > log_file.git
Can it be possible in one command?