Delete all unversioned files
Basically "git clean" functionality
Hi,
We’ve decided to decline this request since it can be easily performed through the ‘cm status’ command.
As detailed in our forum, you can either use PowerShell:
cm status —private —short $workspacePath | % { rm $_ }
Or one of the two bash alternatives:
cm status —private —short ${WORKSPACE_PATH} | while read FILE; do rm $FILE; done
or
cm status —private —short ${WORKSPACE_PATH} | xargs rm
We’d like to thank you for your feedback! As always, it’s really appreciated.
Regards,
Miguel
-
Max Boonzaayer (Litruv) commented
nah, this doesn't work with cloud at all. what a joke of a decision lmao
-
Paul commented
How do you delete unversioned directories? Those are not listed with this command.
I have to say, this decision is really disappointing. I've been searching for a while to try out to figure out how to delete all the unversioned files, something I can do easy and do often in both svn and git, and trying the various suggestions for plastic scm here and else where hasn't worked.
Edit - ok in was a hidden directory that wasn't listed. Still, now I have to have a non-trivial script that I have to copy around to various repos anytime I want to clean them :/ And the powershell command listed didn't work for me. Been working on this a couple hours, just trying to figure out how to replicate a simple git clean -xfd command and so far havent' been able to.