How do I keep Perforce updated versus git updated?

At my company, we are running an experimental program to use GitHub: Enterprise and determining if it is a suitable replacement for Perforce. Until the company is comfortable with it, we will use both systems, although individual teams will either use one or the other.

One thing we would like to do is change seen in the main lines of the project, in the Perforce repo, so there is an escape hatch in there if the pilot takes off. This will keep the controls happier if we run into snags.

I've been using git -p4 for a while now and I'm familiar with how it works, so I know I can't just naively use it to automatically make changes (for those who don't know: every time you click on the perforce repository, all pushed commits are overwritten).

Does anyone have any experience with keeping Perforce downstream of git up to date? Is there an automated way to do this? Perhaps with some combination of scripts and GitHub APIs?


source to share

1 answer

To the head, I suggest keeping separate P4 and master branches in git, and cherry-picking new changes from master on P4 as they come in. You probably want to keep the integration in a separate git repository that is not used for anything else.



All Articles