From: Andreas Schwab <schwab@linux-m68k.org>
To: Miles Bader <miles@gnu.org>
Cc: git@vger.kernel.org
Subject: Re: Newbie in Git. How to get back from last pull?
Date: Sun, 01 Aug 2010 11:32:15 +0200 [thread overview]
Message-ID: <m2k4oaptk0.fsf@igel.home> (raw)
In-Reply-To: <87bp9mbsp0.fsf@catnip.gol.com> (Miles Bader's message of "Sun, 01 Aug 2010 18:14:35 +0900")
Miles Bader <miles@gnu.org> writes:
> 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_!
IMHO the very first step should be to run "git status" and see what it
says. With that information it would be much easier to recommend
further steps.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2010-08-01 9:32 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
2010-08-01 9:32 ` Andreas Schwab [this message]
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=m2k4oaptk0.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=git@vger.kernel.org \
--cc=miles@gnu.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.