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

Re: "git reset --hard" not cleaning up working copy?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 7, 2007, 11:13 UTC
Message-ID
<Pine.LNX.4.64.0705071312400.4167@racer.site>
In-Reply-To
<200705070951.39677.johan@herland.net>
Hi,
On Mon, 7 May 2007, Johan Herland wrote:
> When I "git reset --hard HEAD" to purge all my non-committed changes, it 
> seems that files I created after the last commit (but not part of the 
> index) are left lying around my working copy. Is this intended?

Bien sur it is intended! Git has no business deleting files it has not been told about.

What you probably want is "git clean" after that reset...

Hth, Dscho

Previous: Johan Herland
Message 2 of 2 in “"git reset --hard" not cleaning up working copy?”
  1. Johan HerlandMay 7, 2007
  2. Johannes SchindelinMay 7, 2007

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.