Remove a file from Perforce control without deleting from workspace?

这一生的挚爱 提交于 2020-01-14 07:38:10

问题


Is there a way to remove files/directories from Perforce's control without deleting the file from the client workspace?

I'm indifferent about what happens to the files/dirs in the repository, I want to ensure that they ARE NOT removed from my local workspace.

Thanks.


回答1:


Try

p4 delete -k <file>

It will update the server, but not touch the workspace.

http://www.perforce.com/perforce/doc.current/manuals/cmdref/delete.html




回答2:


If you're not connected to a server that supports the -k switch on the delete command, you can create a new workspace that has a different root, delete the files from there, then switch back to your original workspace. Because the new workspace has a different root, the files in your original workspace won't be touched.




回答3:


You can shelve the files and then delete the "shelved files" in perforce, your local files should be intact.



来源:https://stackoverflow.com/questions/9773766/remove-a-file-from-perforce-control-without-deleting-from-workspace

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!