git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: File version at a specific date?
Date: Mon, 31 Jul 2006 20:24:04 +0200	[thread overview]
Message-ID: <ealhrj$pdo$1@sea.gmane.org> (raw)
In-Reply-To: 200607311956.00679.Alexander.Zvyagin@cern.ch

Alexander ZVYAGIN wrote:

> I failed to find in the documentation how to look to a file content
> at some moment in a past.
> 
> Something like this:
> $ git checkout master~2 Makefile
> when I specify not the revisions numbers ago the file was (~2),
> but the time, for example "2005-12-12 00:00:00" or something like this.
> 
> Where should I look at?

Either use git rev-list with --since=datestring, --after=datestring,
--until=datestring, --before=datestring to find a commit, or if you have
reflog enabled (you have .git/logs/refs/) you can use @{date} syntax,
see 'man git-rev-parse'

"A suffix @ followed by a date specification enclosed in a brace pair  (e.g.
 {yesterday},  {1  month  2 weeks 3 days 1 hour 1 second ago} or {1979-02-26
 18:30:00}) to specify the value of the ref at a prior point in  time.  This
 suffix  may  only be used immediately following a ref name and the ref must
 have an existing log ($GIT_DIR/logs/<ref>)."

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

  reply	other threads:[~2006-07-31 18:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-31 17:56 File version at a specific date? Alexander ZVYAGIN
2006-07-31 18:24 ` Jakub Narebski [this message]
2006-07-31 22:20   ` Shawn Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ealhrj$pdo$1@sea.gmane.org' \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).