All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miles Bader <miles@gnu.org>
To: git@vger.kernel.org
Subject: Re: Newbie in Git. How to get back from last pull?
Date: Sun, 01 Aug 2010 18:14:35 +0900	[thread overview]
Message-ID: <87bp9mbsp0.fsf@catnip.gol.com> (raw)
In-Reply-To: 20100801083000.GF26006@kytes

Ramkumar Ramachandra <artagnon@gmail.com> writes:
> 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!

... and:  0. In "emergency recovery situations", _back up your whole
source dir (including .git subdir) somewhere else before screwing
around_!

E.g., "cp -a my_src_dir /somewhere_else/my_src_dir_backup"

-Miles

-- 
Pray, v. To ask that the laws of the universe be annulled in behalf of a
single petitioner confessedly unworthy.

  reply	other threads:[~2010-08-01  9:14 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
2010-08-01  9:14   ` Miles Bader [this message]
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=87bp9mbsp0.fsf@catnip.gol.com \
    --to=miles@gnu.org \
    --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.