Community
Participate
Working Groups
I noticed when switching branches (and applying different patches), that untracked files remained in my working directory. From my Eclipse CVS background, I expect a 'replace with latest from head' to clean my working directory (removing any untracked files). While this behaviour might not be desirable in EGit, having the option to 'clean' your directory seems valuable. I learned today about `git clean -d -f`, but I don't see a way to do this from the Eclipse UI. Maybe I'm just missing something (if so, feel free to close this as invalid). Otherwise, I think we should add an option (either to the branch checkout workflow, or to the team menu somewhere).
git checkout doesn't ever touch untracked files what you want is git clean but this is not yet implemented
*** Bug 347159 has been marked as a duplicate of this bug. ***
*** Bug 356546 has been marked as a duplicate of this bug. ***
*** Bug 361696 has been marked as a duplicate of this bug. ***
Cleaning and reverting to a well-defined state is an important functionality. "git clean" alone could be a "Team > Advanced" command as suggested in bug 347159. Even more important are: - "Replace With > Clean HEAD Revision..." and - a checkbox to clean in the "Replace With > Branch, Tag or Reference..." dialog (with persisted state) As an added benefit, these 2 options also make it easier to understand that git reset/checkout without a clean doesn't touch untracked files.
There is a draft from Chris http://egit.eclipse.org/r/#change,3528 but it needs more work. This is an enhancement request.
i have done some work on that and implemented a working Clean... command (which might not be perfect just yet ;)). You can find it here: * egit: http://egit.eclipse.org/r/3528 * jgit: http://egit.eclipse.org/r/4972 (i dared to take over chris' review item for egit ;) hope that doesn't make you mad at me!)
The jgit changes were merged: f64237d5ff240cd62179f25fac7c40a9ffd5b2b8 Rebase the egit changes if you're interested in having it merged :)
Any chance this will be added to the EGit nightly soon? We are finding it a bit frustrating to have to switch back to the command line every time we switch branches just to run get clean -df. Thanks.
https://git.eclipse.org/r/#/c/5345/ is merged. I5136afd3333c6710b0c67c49618df6217e0d1fcf
I verified in 2.3.0.201302010015 that 'Clean...' is now there but it is not very handy yet: - it is only in the 'Git Repositories' view - I can't apply it on a project (or folder) - the UI shows the untracked files as list which makes it hard to quickly clean a concrete project (or folder) Minor details: - the icon with the no entry sign looks a bit strange. I would use an eraser as overly - the mnemonic is missing
(In reply to Dani Megert from comment #11) > I verified in 2.3.0.201302010015 that 'Clean...' is now there but it is not > very handy yet: I moved these to a new bug for better overview, see bug 418210.