How to remove files from changelist in perforce without losing modifications?

Dan Dinu picture Dan Dinu · Dec 16, 2011 · Viewed 28.3k times · Source

I accidentally created a new changelist with files from WORKSPACE not from DEPOT and now under the changelist 4500 modified files are displayed (all dlls pdbs etc. alongside with the files i actually edited)

I'm using the p4v GUI. Is there anyway to undo this, without having to backup all the files then revert them using perforce, put them back and create a new changelist using DEPOT.

Thanks a lot, i hope there's a workaround :).

Answer

John K picture John K · Apr 18, 2014

Not sure if this is what you're looking for, but to remove checked out files from your changelist without removing the edits:

p4 revert -k -c changelist# //...