Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356546

Summary: hard reset does not remove newly created local files
Product: [Technology] EGit Reporter: David Williams <david_williams>
Component: CoreAssignee: Project Inbox <egit.core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description David Williams CLA 2011-09-02 02:09:28 EDT
I've not sure if this is a "feature request" or bug or quirk of Git ... but, from (the little) I have read, I was expecting a hard reset to put my workspace into exactly the same state as the repository branch ... and it does, for content of existing files ... such as if I've typed in some new code and saved it, it will get overwritten with repository version ... but ... it does not remove any new files I've created. This was especially confusing for me, because I had set some project specific settings, realized I'd forgotten to make a local branch first, wanted to 'reset' to known point, but I still had the preferences set. With some experimentation, it appears due to the fact that in this once case, a new '.settings' file was created (instead of existing one modified). Very confusing.
Comment 1 Remy Suen CLA 2011-09-02 06:33:30 EDT
You need 'git clean' for this.

*** This bug has been marked as a duplicate of bug 338717 ***