Re: Newbie: Restore messed up code from local or remote repository
- From
- Santi Béjar <santi@agolina.net>
- Date
- Nov 12, 2010, 14:02 UTC
- Message-ID
- <AANLkTinyhGKbLDJSsu19+capPUgCx0m_5feaOoSuXCm8@mail.gmail.com>
- In-Reply-To
- <20101112124621.GF30870@efreet.light.src>
On Fri, Nov 12, 2010 at 1:46 PM, Jan Hudec <bulb@ucw.cz> wrote:
Show 13 quoted lines
> On Fri, Nov 12, 2010 at 00:22:43 -0800, gzoller wrote: >> >> Hello -- Extreme Git Newbie >> >> I have a project that is checked into a local git repository as well as >> pushed to a remote repository. >> >> Through misadventure I've managed to screw up my working code and want to >> restore what I had from my last commit on either the local or remote >> repositories. > > If you screwed up content of the index, you will need the 'reset' command. >
If the problem is that you messed with the index (stage) or the working directory and you want to discard local changes to them, you could also execute "git status" and follow the instruccions there. If that is not enough, report it here.
HTH, Santi