Re: Newbie in Git. How to get back from last pull?
- From
Miles Bader <miles@gnu.org>
- Date
- Aug 1, 2010, 09:14 UTC
- Message-ID
- <87bp9mbsp0.fsf@catnip.gol.com>
- In-Reply-To
- <20100801083000.GF26006@kytes>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 8 quoted lines
> 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.