2

git add --patch is very important to me. It shows all the diff chunks, and I say "yes" or "no" to add them to the index, from which I commit. In particular if I added something like a console.log in some random file, it won't be picked up in my commit.

For perforce I haven't found anything similar. Nothing as expressive as git.

Is there a good workflow or solution?

djechlin
  • 59,258
  • 35
  • 162
  • 290
  • Use git. Then write a script to check your git master into perforce. Perhaps add support to your script for other branches. I know there's [git-svn](http://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion) and git-cvs, so it's possible to write hooks. – Elliott Frisch Feb 13 '15 at 17:32

1 Answers1

1

Use git-p4 to interact with the Perforce repository using Git. Even the Perforce folks think its a good idea!

Schwern
  • 153,029
  • 25
  • 195
  • 336