Is there a bi-directional bridge between p4 and git? Is there a bi-directional bridge between p4 and git? git git

Is there a bi-directional bridge between p4 and git?


Frankly, you're better off just migrating to Git, and perhaps checking in the git repository itself to perforce if you have a requirement for one reason or another to use perforce.

git <-> perforce bridges are problematic, especially in a distributed environment. Either have one person act as a gatemaster - or have each person sync with perforce individually and not with each other.

--------- UPDATED ---------------

It looks like Perforce has provided 'Perforce Fusion' - see http://www.perforce.com/product/components/git-fusion

This may be a workable solution, and they have a free trial.


I have not heard of a solution. When faced with something like this, I usually go to a scripted solution and try not to bother bringing in the exact history. Usually anything marked as a release from the past 5 releases and all previous major releases. Keep the old repositories around in case you do need to look at a specific commit, but that's only on an as-needed basis.

Hope this helps a bit.

Good luck!


I enhanced git-p4 so that it uses git notes (https://github.com/ermshiperete/git-p4). This has the advantage that the git repo can be shared by multiple people. However, it still doesn't allow complete automation because every developer has to submit his/her own changes to p4.

The way I set it up is that a script on the server checks if any new changes have been checked in to p4. If so it does a git-p4 sync and pushes the changes to the git repo (including the git-p4 notes). Developers working with git pull the master branch and the git-p4 notes branch from the git repo, make their changes and submit them to the local git repo. They then do a git p4 submit and afterwards push master + git-p4 notes branch to the remote git repo.

This works fairly well, although occasionally the server script checking p4 chokes - which I blame on my script. However, this is a band-aid solution and I hope we can move entirely to git soon.