git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Mahesh Vaidya <forvaidya@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: recovering orphaned commit
Date: Tue, 29 Jun 2010 08:17:16 -0700	[thread overview]
Message-ID: <20100629151716.GF2337@spearce.org> (raw)
In-Reply-To: <AANLkTiks6yPfdTACQwZlqv8PPPEg3RYGMx1Q1PjT0nRu@mail.gmail.com>

Mahesh Vaidya <forvaidya@gmail.com> wrote:
>  I have a situation like this; 2 commits.
> 
> Example -
> 
>  2899684ed173063354b7fe4f5ec7216e7d953e2c	 <-- HEAD  ( say C1)
>  1ef67de1a0d6e97470a8c827d2989317600532ff                    ( say C2)
> 
> To see file at C2 ; I have done git reset --hard C2; I could see the file.
> Now want go to C1 ; Ho do I Determine C1  using git command ?

Use `git reflog show` or `git log -g` to view the reflog entries
for HEAD.  It will show you the different states HEAD had, so you
want to find the state before you reset to C2, that would be C1.

-- 
Shawn.

  reply	other threads:[~2010-06-29 15:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 15:09 recovering orphaned commit Mahesh Vaidya
2010-06-29 15:17 ` Shawn O. Pearce [this message]
2010-06-29 15:24 ` Ramkumar Ramachandra
2010-06-29 15:26 ` Jonathan Nieder
2010-06-29 15:29 ` Wincent Colaiuta

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=20100629151716.GF2337@spearce.org \
    --to=spearce@spearce.org \
    --cc=forvaidya@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).