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

Newbie: Restore messed up code from local or remote repository

From
Ggzoller <gzoller@hotmail.com>
Date
Nov 12, 2010, 08:22 UTC
Message-ID
<1289550163511-5731540.post@n2.nabble.com>
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.

So I blew away my messed up working files and tried:

git checkout git pull -f /path/to/remote/repos git fetch -f /path/to/remote/repos

None of the above did the trick. The two remote commands reported that everything was Already up-to-date! (even though I'd deleted a lot of local working files)

What am I missing?  How can I restore my previous state from last commit?

Thanks! Greg

-- 
View this message in context: http://git.661346.n2.nabble.com/Newbie-Restore-messed-up-code-from-local-or-remote-repository-tp5731540p5731540.html
Sent from the git mailing list archive at Nabble.com.
Next: Ramkumar Ramachandra
Message 1 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.