Anything similar to git-svn for Perforce?

前端 未结 1 736
囚心锁ツ
囚心锁ツ 2021-02-10 12:56

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 Perforc

相关标签:
1条回答
  • 2021-02-10 13:40

    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.)

    0 讨论(0)
提交回复
热议问题