Add code to project with perforce

I do it from inside UE by going to File → Add Code to Project.