4

How can I sync my git repos (with own history) to p4 repo (with own history) but files in this repos on HEAD is the same.

I do

git clone git@git.dev.local:qwerty.git
cd qwerty
git p4 sync //path/in/your/perforce/depot

Got this graph Graph

What should I do next ?

Also When I do

git p4 rebase

I have got this error fatal: Not a valid object name HEAD~97
Command failed: git cat-file commit HEAD~97

ButuzGOL
  • 1,233
  • 2
  • 13
  • 27

1 Answers1

0

Fundamentally I don't think you can, as you have two development histories which happen to produce the same HEAD set of files.

I think you'll need to either:

  1. Throw away your git history, and import from perforce:
    1. With git-p4
    2. Or with perforce-git fusion
    3. Before doing this you can edit the perforce history manually to include as much detail as possible from the git history.
  2. Throw away your perforce history, and recreate from the git history (not sure of the best way of doing this - it may depend what else is in your perforce repository).
Douglas Leeder
  • 52,368
  • 9
  • 94
  • 137