All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Yankovsky <YankovskyAndrey@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Newbie in Git. How to get back from last pull?
Date: Sun, 1 Aug 2010 14:00:02 +0530	[thread overview]
Message-ID: <20100801083000.GF26006@kytes> (raw)
In-Reply-To: <1280649966984-5360499.post@n2.nabble.com>

Hi Yankovsky,

Yankovsky writes:
> I have commited all my changes, and accidently typed git pull, then was
> paniced and aborted the operation. now all my changes in project disappear.
> but i have commit. how can i restore my project status using this commit?
> I hope you understand my rus english)

I don't understand exactly what you want to do, but here are the
basics- you can decide what you want to do.
1. Use `git reflog` to see a history of your operations.
2. If you want your working copy to switch to an existing commit, use
   `git checkout <SHA1 of commit>`.
3. If you want to irreversibly destroy everything and switch your
   working copy to a desired commit, use `git reset --hard <SHA1 of
   commit>`. Use with care!

Hope that helps.

-- Ram

  reply	other threads:[~2010-08-01  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-01  8:06 Newbie in Git. How to get back from last pull? Yankovsky
2010-08-01  8:30 ` Ramkumar Ramachandra [this message]
2010-08-01  9:14   ` Miles Bader
2010-08-01  9:32     ` Andreas Schwab
2010-08-01 10:11     ` Yankovsky
2010-08-01 10:02   ` Yankovsky

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=20100801083000.GF26006@kytes \
    --to=artagnon@gmail.com \
    --cc=YankovskyAndrey@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.