# "git reset --hard" not cleaning up working copy?

2 messages from 2007-05-07 to 2007-05-07. Participants: Johan Herland, Johannes Schindelin.
Thread: https://gitlist.dev/t/8015

## Johan Herland, 2007-05-07 07:51

Subject: "git reset --hard" not cleaning up working copy?
Message-ID: <200705070951.39677.johan@herland.net>
URL: https://gitlist.dev/e/200705070951.39677.johan%40herland.net

```
Hi,

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?


Have fun!

...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

```

## Johannes Schindelin, 2007-05-07 11:13

Subject: Re: "git reset --hard" not cleaning up working copy?
Message-ID: <Pine.LNX.4.64.0705071312400.4167@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0705071312400.4167%40racer.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

```
