Let’s say I’ve branched a file in perforce and edited it. Now I’d like to discard the branch history and treat the file as a fresh add. What command accomplishes this?
This scenario arises often because my IDE insists on treating a copy as a branch/edit. After making extensive changes to the copied file, it causes confusion to treat it as a branch/edit.
You can revert the new file and then add it back, without the copy/move.
But, the history is there for a reason. If one exists, you might want to keep it – it might be helpful to see the lineage (even if muddled) at some point in the distant future. Consider changing your settings on your IDE.