任何类似于Perforce的git-svn? [英] Anything similar to git-svn for Perforce?

查看:151
本文介绍了任何类似于Perforce的git-svn?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种工具可以让我获得与Perforce相同的git-svn功能?我在github上看到了git-p4,但它看起来像是从git repo导入源到Perforce repo。它是否相反?它的目的是作为一个频繁的工具使用,或者只是一次性的进口型工具吗?

场景:我是一个承包商,我的客户使用Perforce for他们的源代码控制,但我想在本地使用git。

c $ c>可以双向使用。使用 git-p4 sync git-p4 rebase 更新您的本地工作区,然后在本地使用git。准备好将你的git提交提交到p4时,使用 git-p4 submit



你需要创建一个P4客户端(与git workarea分开),并专门用于同步使用 git-p4



我在本地使用它,它已经运行好几个月了,有一些注意事项:




  • 你可以在本地使用git分支但P4不会了解任何事情。它只会看到master。

  • 文件重命名将在P4中显示为add + delete,而不是首选的integration + delete。


  • 运行 git-p4 submit 时会重新创建Git提交,因此时间戳将会关闭,您可能会将问题与您的其他git分支。 (就像从上游重建的问题。)



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

这篇关于任何类似于Perforce的git-svn?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆