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

Feature suggestion: new 'git add -i' command to discard working copy changes

From
EDEvan Driscoll <driscoll@cs.wisc.edu>
Date
Dec 18, 2012, 21:03 UTC
Message-ID
<50D0DA19.5030606@cs.wisc.edu>

It's not infrequent that I want to discard changes I've made locally to files ('git checkout file.txt') and find myself wishing that this was an action available from the 'git add --interactive' UI; it feels like it would fit in.

Does this sound like it would be useful? I might even be able to try my hand at adding it if it seems like something that might be accepted upstream and someone can point me at the places in the code to look.

Evan
Next: Junio C Hamano
Message 1 of 5 in “Feature suggestion: new 'git add -i' command to discard working copy changes”
  1. Evan DriscollDec 18, 2012
  2. Junio C HamanoDec 18, 2012
  3. Jeff KingDec 18, 2012
  4. Evan DriscollDec 18, 2012
  5. Jeff KingDec 18, 2012

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.