Options to import git repositories into Perforce Helix Core.
Script to migrate history from a git LFS repository into p4 (Perforce Helix Core).
As of 2022/04/19 this is functional for a single branch at a time, although still considered Beta state.
It loops over commits in reverse order:
- Checks out the commit (LFS will get the contents of the files)
- Uses
git diff-treeand then replays the contents of each file - Focusses on a single branch at a time (e.g. master), not branches
- Stores latest processed commit as a counter in Helix Core - so incremental or partial runs can be done
- Can process active branches with some manual steps.
For details of design/usage etc see: GitP4Transfer.adoc
The command imports Git history into Helix Core by creating a Helix Core checkpoint file and associated archive
files. It accepts git fast-export files for Git and Plastic SCM migrations, or imports a native Git repository
directly with --native-git.
For a direct repository import, provide exactly one repository path and an archive root:
gitp4transfer --native-git --archive.root /path/to/p4-root --journal jnl.0 /path/to/git-repositoryBy default native mode imports refs/heads/<default.branch>; set --native.git.ref to select another ref.
This is documented in: GitP4Transfer.adoc
It is considered to be in beta release.