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

how to revert changes in working tree?

From
LYLiu Yubao <yubao.liu@gmail.com>
Date
Dec 6, 2006, 06:49 UTC
Message-ID
<4576680B.7030500@gmail.com>
I'm confused how to revert changes in working tree:

$ git fetch $ git merge "sync with origin" HEAD origin ....conflict....

$ git branch
* master
  origin

$ git status # .....: needs update # .....: needs update (In fact I never modified anything in this tree, and "git diff" showed many difference indeed, very strange).

I tried "git update-index --refresh", "git reset --hard", "git reset --hard master", "git checkout master", "git checkout -f master", but "git status" still said same as above.

At last, I deleted all files that were reported to be updated with "rm -rf", ran "git checkout master" and "git status", then git reported: # deleted: .... # deleted: ....

Next: Alex Riesen
Message 1 of 11 in “how to revert changes in working tree?”
  1. Liu YubaoDec 6, 2006
  2. Alex RiesenDec 6, 2006
  3. Liu YubaoDec 6, 2006
  4. Alex RiesenDec 6, 2006
  5. Liu YubaoDec 6, 2006
  6. Alex RiesenDec 6, 2006
  7. Jakub NarebskiDec 6, 2006
  8. Shawn PearceDec 6, 2006
  9. Liu YubaoDec 7, 2006
  10. Juergen RuehleDec 7, 2006
  11. Jakub NarebskiDec 6, 2006

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.