Git Diff to Perforce?
According to what I have read, it seems this can be done by doing a git diff, creating a patch and then applying to the perforce code base. But, I have seen any concrete example. Could anyone help me on this? Thanks.
One Solution collect form web for “Git Diff to Perforce?”
You can form a patch from git history with a simple
git diff <point1>..<point2> > the_diff.patch and then apply that patch to your working tree using
patch -p1 <the_diff.patch and commit the changes to perforce.
Also you could form a sequence of git commits as separate patch files using
git format-patch <point1>..<point2> and apply them sequentally if you wish.
There’s git-p4 tool to import/export commits from/to git and perforce repositories, but I haven’t use it so far.