Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce to git migration [closed]

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

like image 916
user1250496 Avatar asked Sep 12 '26 17:09

user1250496


1 Answers

There's official documentation available on git-p4. It addresses the specific scenario you describe:

To reproduce the entire p4 history in Git, use the @all modifier on the depot path:

$ git p4 clone //depot/path/project@all

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.

like image 110
khagler Avatar answered Sep 14 '26 07:09

khagler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!