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

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

I’d like to diff my local file against the depot, and then choose which parts of the diff will end up in the changelist.

  • How to rebase local branch with remote master
  • Ensure that git remote tracking branch stays in sync with remote
  • Git and tfs: can I have only the central repo communicate with tfs?
  • Working with Git submodules without .gitmodules
  • How do I install and use MySQLdb for Python 3 on Windows 10?
  • How to git merge --squash so that github “network” diagram shows the merge
  • (My goal here is to take multiple changes I’ve made to a file and commit them in two separate changelists, since they’re not conceptually related. But you could also use this to not commit debug code but still leave it in locally).

  • Git integration broken in Visual Studio 2015 Update 3
  • Is there a simple way to “git describe” a remote repository?
  • Verify changes in git modules
  • How can I use “git describe --match” sensibly in combination with a shallow clone?
  • How to find out my own composer package stability?
  • GitLab SSL handshake error when performing a Git Pull/Clone Using TortoiseGit and Ansible
  • 2 Solutions collect form web for “How to interactively add files in Perforce (equivalent of `git add -p`)”

    No.

    You’ll need to shelve one set of changes first.

    Sorry.

    Perforce does not have git’s concept of a staging area, so an equivalent of git add -p doesn’t really make sense (where do you want the non-added edits to go? Into a shelved change?)

    Personally I use git-p4 and to create a git mirror of a Perforce tree, and then I can actually use git add -p. (You alternatively might want to look into Perforce’s Git Fusion system.)

    Git Baby is a git and github fan, let's start git clone.