Git Perforce到BitBucket迁移

Git Perforce到BitBucket迁移,git,bitbucket,perforce,Git,Bitbucket,Perforce,不确定我是否从正确的角度来处理这个问题,但以下是我需要如何将项目从perforce迁移到bitbucket。我对Git几乎没有经验 我对保存提交历史不感兴趣,只对回购协议和分支机构的结构感兴趣。由于代码已经在本地,因此基本上应该按位桶发送 假设我在P4中有: PROJECT repository: project_component_A_dir main branch branch-1 branch-2 p

不确定我是否从正确的角度来处理这个问题,但以下是我需要如何将项目从perforce迁移到bitbucket。我对Git几乎没有经验

我对保存提交历史不感兴趣,只对回购协议和分支机构的结构感兴趣。由于代码已经在本地,因此基本上应该按位桶发送

假设我在P4中有:

   PROJECT repository:
      project_component_A_dir
          main branch
          branch-1
          branch-2
      project_component_B_dir
          main branch
          branch-1
          branch-2
我需要在BitBucket中迁移它:

PROJECT
   repo_project_component_A
      master
      branch-1
      branch-2
   repo_project_component_B
      master
      branch-1
      branch-2
我努力实现的方式是:

   cd ../project_component_A_dir/main_branch
   git init
   git add *
   git commit -m 'commiting the master'
   git remote add origin https://repo_project_component_A
   git push -u origin master

  cd ../project_component_A_dir/branch-1
  git checkout -b branch-1, but the result is an error
 fatal: Not a git repository (or any of the parent directories): .git
我不确定这是否可行,更不确定这是否是正确的方法。我想得到一些关于这方面的反馈,并听听实现上述目标的其他策略

多谢各位