Git diff to perforce?

We have a Perforce repository, and we later switched to Git. However, we have a release branch that is valid, and now I need to apply some of git to bind to the perforce branch.

According to what I read, it seems like this can be done by doing git diff, creating a patch, and then applying it to the perforce database. But I saw a concrete example. Can someone help me with this? Thanks.

+4
source share
1 answer

You can create a patch from git history with a simple one git diff <point1>..<point2> > the_diff.patch, and then apply this patch to your working tree with patch -p1 <the_diff.patchand commit the changes to perforce.

git, git format-patch <point1>..<point2> , .

git-p4 / / git perforce , .

+4

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


All Articles