【问题标题】:Migrating all branches in p4 to git将 p4 中的所有分支迁移到 git
【发布时间】:2015-04-22 06:29:25
【问题描述】:

我正在尝试将整个 p4 树复制到 git 树中。 我的p4 client 下有两个分支

 //dev/... //user/dev/...
 //infra/lib/... //user/dev/memo/lib/... 

现在我只做git p4 clone --use-client-spec --detect-branches //dev dev 分支正在被复制,infra 分支没有被复制。 我什至尝试使用

git p4 clone --detect-branches //dev@all

Importing from //dev@all into dev
Initialized empty Git repository in /auto/mem-proj02/user/new_dir/dev/.git/
Importing revision 11477 (100%)
Not checking out any branch, use "git checkout -q -b master <branch>"

这也不会复制infra 分支。

所以任何人都可以帮助我sync/clonep4 中的所有分支到git。 我也试过How to clone branch with git-p4? 但我没能做到。

请帮帮我!!!

【问题讨论】:

    标签: git perforce


    【解决方案1】:

    分支检测代码使用 P4 分支规范来查找分支。因此,如果您没有这些设置之一,它将找不到任何设置。如果您有任何分支规范设置,这将报告:

    $ p4 branches

    也可以通过 git-config 配置分支关系来告诉 git-p4:

    git-p4.branchList 可用于显式识别分支关系。它是“source:destination”对的列表,就像一个简单的 p4 分支规范,其中“source”和“destination”是 p4 存储库中的路径元素。

    http://git-scm.com/docs/git-p4

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-07
      • 2021-07-30
      • 2021-10-01
      • 2018-11-17
      • 2018-02-22
      • 2021-09-24
      相关资源
      最近更新 更多