0

I am trying to copy my entire p4 tree into a git tree. I have two branches under my p4 client

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

Now when I do git p4 clone --use-client-spec --detect-branches //dev only the dev branch is being copied and the infra branch is not being copied. I even tried using

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>"

This also doesn't copy infra branch.

So can anyone please help me sync/clone all the branches in p4 into git. I have also tried How to clone branch with git-p4? But I was not able to achieve it .

Please help me !!!

Community
  • 1
  • 1
Newbie
  • 2,664
  • 7
  • 34
  • 75

1 Answers1

0

The branch-detection code uses P4 branch specs to find the branches. So if you haven't got one of those setup, it won't find any. This will report if you have any branch specs setup:

$ p4 branches

You can also tell git-p4 by configuring branch relationships with git-config:

git-p4.branchList can be used to explicitly identify branch relationships. It is a list of "source:destination" pairs, like a simple p4 branch specification, where the "source" and "destination" are the path elements in the p4 repository.

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

Luke
  • 589
  • 2
  • 8