How to interactively add files to Perforce (equivalent to `git add -p`)

Is there something in Perforce that works like git add -p ?

I would like to split my local file into a depot, and then choose which parts of diff will fall into the change list.

(My goal is to make several changes that I made to the file and transfer them to two separate change lists, since they are not conceptually related. But you can also use this to not execute the debugging code, but still leave it locally).

+5
source share
2 answers

No.

First you need to defer one set of changes.

Unfortunately.

+4
source

Perforce does not have the concept of a git staging area, so the git add -p equivalent of git add -p doesn't make sense (where do you want non-added changes to come into pending change?)

Personally, I use git-p4 and create a git mirror of the Perforce tree, and then I can really use git add -p . (You might also want to check out the Perforce git Fusion system.)

+2
source

Source: https://habr.com/ru/post/1268453/


All Articles