I need to migrate repos from perforce to git with all the history. I tried searching through the web, but didn't find any clear documentation mentioning each and every step in detail. I saw an utility called git-p4 but didn't find any clear documentation related to that utility too.
Can somebody explain me on how I can perform this or provide me with the documentation that is helpful.
Regards
There's official documentation available on git-p4. It addresses the specific scenario you describe:
Note that if you have labels in your Perforce depot you'll need to add the
--import-labels
option to get them. If you have branches in Perforce, you'll want to look at the--detect-branches
option as well.Note that after running this command you'll have a
p4
remote in your git repo. That's for people who plan to submit from git back into p4, but since you mentioned that you were migrating you can safely delete it.