git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Newbie: Restore messed up code from local or remote repository

From
SBSanti 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

Previous: Jan HudecNext: gzoller
Message 4 of 6 in “Newbie: Restore messed up code from local or remote repository”
  1. gzollerNov 12, 2010
  2. Ramkumar RamachandraNov 12, 2010
  3. Jan HudecNov 12, 2010
  4. Santi BéjarNov 12, 2010
  5. gzollerNov 12, 2010
  6. Matthieu MoyNov 12, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.