Git Diff to Perforce?

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

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.

  • How do I view git diff with textmate
  • Can I send out of band data along with a commit?
  • Getting to prompt with GitBash in Windows 7
  • Tag messages on github
  • Error when syncing with Github for Mac app
  • why i cannot push mirror to github?
  • Can I add a metadata to a source file in eclipse on save/commit/upload?
  • How to make GIT ignore my changes
  • Can not access via ssh and view layout without css
  • Is there some way to work with git using .NET application?
  • Git commit policy that isolates changes to specific files as separate commits
  • what causes submodule conficts in git, and how should they be resolved?
  • 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.

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