February 19, 2014

Git and Perforce: 13 FAQs Answered

Git at Scale

Part 2 of 2

In Part 1 of this series we discussed how Perforce enables you to use both Git and P4 simultaneously. Users do not have to be forced to choose one tool or workflow. The support is seamless and is unique in the industry. Unlike other solutions, only Perforce can serve as a Git master, serving both Git and P4 requests, instead of just bidirectional synching with a remote Git repository. Here are answers to common questions that we come across:

  1. How do I talk Git to Perforce?

    Deploy Perforce Git Fusion bundle alongside your P4 Server. Configure it. You’re all set. You can now import Git repos into your server and use it as a remote for future Git development.

  2. Do I need to install Perforce’s Git on my desktop?

    There is no such thing as Perforce’s Git. You use your standard Git environment for development, no matter where you downloaded Git from.

  3. Do I need to install a Perforce client on my workstation?

    No! You do not have to install anything Perforce on your machine. Git will suffice.

  4. Can I work with other Git masters like GitHub?

    Yes, you can continue to leverage other Git repository managers like GitHub or Stash in your development effort, and push to/ pull from Perforce P4 server as appropriate.

  5. Will I need to change my workflow?

    Nothing changes in your workflow. As far as you know, P4 doesn’t exist. You can use gitflow, a lieutenant/commander workflow, or anything else you can dream up.

  6. Can I connect using ssh? Can I connect using http?

    You can connect using SSH or HTTP. We don’t support the Git protocol currently.

  7. Do I have to know Perforce in any way?

    Nope. If you want to define a brand new repository you will need to specify a view mapping, but once that is done it’s all Git, all the time.

  8. Can I rebase my branches?


  9. Can I merge?


  10. What can't I do?

    If you use notes and subtrees, that is something we don’t support yet.

  11. What about submodules?

    We fully support submodules. That said, you might benefit from some of the repo refactoring capabilities we offer to help you avoid the submodule hell.

  12. Really, even submodules?

    Even nested submodules.

  13. Why would I want to use Perforce server to host my Git repos?

    Ever wish you could have a shallow repo that was workable? Perforce can do that while still allowing you to share your commits upstream.

    Ever wish you could combine two git repos into one? Perforce can do that too, while still allowing you to share your commits upstream with the original repos.

    Ever had to split up a repo, but wish you could keep the same chunk of the code in each new repo? Perforce can do that, and keep the shared code in sync for you, automatically.

    Lastly, if your organization uses Perforce, but you wish to use Git, this is your way out! Collaborate with your peers, using the tools you want to use. The choice is yours.

Part 1: Git and Perforce: No Choice Required