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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Johan Herland <hidden>
Date: 2016-06-15 22:43:08

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, [off-list ref]
www.herland.net

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

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:08

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help