Skip to main content

Posts

Showing posts from April, 2015

Perforce (p4) to Git migration

This process use  Git-p4   as an import tool. Please follow below steps:- Install Python, Perforce client, Git bash on your machine. Download python script ( git-p4.py ) from given location@  https://raw.githubusercontent.com/git/git/master/git-p4.py Set following environment variables:- P4PORT=public.perforce.com:1666 P4USER=testgitp4 Run following command to import P4 project supplying project depot path on Perforce server and the path into which you want to import project. $ python git-p4.py //depot/myproject@all /e/git/myproject           Importing from //depot/myproject@all into /e/git/myproject Initialized empty Git repository in /private/tmp/p4import/.git/ Import destination: refs/remotes/p4/master Importing revision 2153 (100%) Chand directory to  /e/git/myproject At this point you’re almost done. If you run git log, you can see your imported work. $ git log -2 commit 33ddd3a8c5c1eda6ea...