有类似于 Perforce 的 git-svn 的东西吗?

发布于 2024-08-16 03:24:54 字数 196 浏览 3 评论 0原文

有没有一个工具可以让我获得与 Perforce 的 git-svn 相同的功能?我在 github 上看到了 git-p4,但看起来像是将源代码从 git 存储库导入到 Perforce 存储库。情况是否会反过来呢?它是用作常用工具还是仅用作一次性导入类型的工具?

场景:我是一名承包商,我的客户使用 Perforce 进行源代码控制,但我想在本地使用 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

给我一枪 2024-08-23 03:24:54

git-p4 可以是双向的。使用 git-p4sync 或 git-p4 rebase 更新本地工作区,然后在本地使用 git。当准备好将 git 提交提交到 p4 时,请使用 git-p4 commit 。

您将需要创建一个 P4 客户端(在与 git 工作区不同的位置)并将其专门用于使用 git-p4 进行同步。

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

  • 你可以在本地使用 git 分支,但 P4 对它们一无所知。它只会看到 master。

  • 文件重命名将在 P4 中显示为添加+删除,而不是首选的集成+删除。

  • 运行 git-p4 Submit 时会重新创建 Git 提交,因此时间戳将会关闭,并且您可能会遇到与其他 git 分支的合并问题。 (就像“从上游 rebase 恢复”问题一样。)

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文