Is there a tool that allows me to gain the same functionality as git-svn for Perforce? I saw git-p4 on github but it looks like this imports source from a git repo to a Perforce repo. Does it go the other way around? Is it intended to be used as a frequent tool or just a 1 time, import-only type of tool?
Scenario: I am a contractor, my client uses Perforce for their source control, but I would like to use git locally.
git-p4
can go both ways. Use git-p4 sync
or git-p4 rebase
to update your local workarea, then use git locally. When ready to submit your git commits into p4, use git-p4 submit
.
You will need to create a P4 client (in a separate place from your git workarea) and use it exclusively for synchronizing using git-p4
.
I use this locally and it has been working well for months, with a few caveats:
You can use git branches locally but P4 will not know anything about them. It will see only master.
File renames will show up in P4 as add+delete instead of the preferred integrate+delete.
Git commits are recreated when running git-p4 submit
, so the timestamp will be off, and you may have merge issues with your other git branches. (Just like the "recover from upstream rebase" problem.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With