Need advice about which tool to choose?Ask the StackShare community!

Git

288.2K
173.2K
+ 1
6.6K
Perforce

82
112
+ 1
9
Add tool

Git vs Perforce: What are the differences?

Introduction

Git and Perforce are both version control systems commonly used in software development. While they serve the same purpose of tracking changes to files and collaborating on projects, there are key differences between the two. This article highlights six important distinctions between Git and Perforce.

1. Distributed vs Centralized: Git is a distributed version control system, meaning that each developer has a complete copy of the entire repository with full history on their local machine. In contrast, Perforce is a centralized version control system, where the repository is stored on a central server and developers access files through client applications connected to the server. This allows Git to work offline and enables faster operations since most operations are performed locally, whereas Perforce relies on network connectivity and has slower performance for operations that involve the server.

2. Branching and Merging: Git has a highly flexible and lightweight branching model. Developers can create branches effortlessly, allowing for easy experimentation and parallel development. Merging branches is also straightforward, with Git automatically detecting and resolving conflicts. Perforce, on the other hand, has a more complex branching and merging process. Creating branches requires lower-level administrative operations, and merging can be more error-prone, often requiring manual conflict resolution.

3. Repository Size: Git repositories typically have a smaller footprint compared to Perforce repositories. Git uses a delta compression method and stores changesets efficiently, resulting in smaller storage requirements. Perforce, being a centralized system, stores each file version individually, leading to larger repository sizes. This can impact the time and resources required for repository backups, cloning, and transferring data.

4. File Locking: Perforce provides a file-locking mechanism, which allows developers to lock files exclusively before editing them. This prevents concurrent modifications and conflicts, ensuring that only one person can edit a file at a time. Git, on the other hand, does not have built-in file locking. Instead, it encourages a more collaborative approach, allowing multiple developers to work on the same file simultaneously. Git helps resolve conflicts during merges and provides tools for efficient collaboration.

5. Integration and Extensibility: Git has excellent integration capabilities and can be easily integrated with other tools and services. There are numerous third-party integrations available for Git, allowing seamless connection with popular development platforms and workflows. Perforce, on the other hand, has a more comprehensive set of integrated development features built directly into the platform. It offers extensive support for large-scale projects, task management, and complex build processes.

6. Licensing and Cost: Git is an open-source version control system, distributed under the GNU General Public License. This means that Git is free to use and modify, making it an attractive choice for organizations of any size. Perforce, on the other hand, is a commercial system that requires licensing and may involve additional costs, depending on the number of users and specific requirements. The licensing model and associated costs can significantly impact the choice between Git and Perforce for organizations.

In Summary, Git and Perforce differ in their distribution model, branching and merging capabilities, repository size, file locking mechanism, integration options, and licensing and cost structure. Understanding these differences is crucial in choosing the right version control system for a particular project or organization.

Decisions about Git and Perforce
Kamaldeep Singh

SVN is much simpler than git for the simple stuff (checking in files and updating them when everyone's online), and much more complex than git for the complicated stuff (branching and merging). Or put another way, git's learning curve is steep up front, and then increases moderately as you do weird things; SVN's learning curve is very shallow up front and then increases rapidly.

If you're storing large files, if you're not branching, if you're not storing source code, and if your team is happy with SVN and the workflow you have, I'd say you should stay on SVN.

If you're writing source code with a relatively modern development practice (developers doing local builds and tests, pre-commit code reviews, preferably automated testing, preferably some amount of open-source code), you should move to git for two reasons: first, this style of working inherently requires frequent branching and merging, and second, your ability to interact with outside projects is easier if you're all comfortable with git instead of snapshotting the outside project into SVN.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Git
Pros of Perforce
  • 1.4K
    Distributed version control system
  • 1.1K
    Efficient branching and merging
  • 959
    Fast
  • 845
    Open source
  • 726
    Better than svn
  • 368
    Great command-line application
  • 306
    Simple
  • 291
    Free
  • 232
    Easy to use
  • 222
    Does not require server
  • 27
    Distributed
  • 22
    Small & Fast
  • 18
    Feature based workflow
  • 15
    Staging Area
  • 13
    Most wide-spread VSC
  • 11
    Role-based codelines
  • 11
    Disposable Experimentation
  • 7
    Frictionless Context Switching
  • 6
    Data Assurance
  • 5
    Efficient
  • 4
    Just awesome
  • 3
    Github integration
  • 3
    Easy branching and merging
  • 2
    Compatible
  • 2
    Flexible
  • 2
    Possible to lose history and commits
  • 1
    Rebase supported natively; reflog; access to plumbing
  • 1
    Light
  • 1
    Team Integration
  • 1
    Fast, scalable, distributed revision control system
  • 1
    Easy
  • 1
    Flexible, easy, Safe, and fast
  • 1
    CLI is great, but the GUI tools are awesome
  • 1
    It's what you do
  • 0
    Phinx
  • 3
    Powerful
  • 3
    Great for Enterprise level use
  • 2
    Robust
  • 1
    Scalable

Sign up to add or upvote prosMake informed product decisions

Cons of Git
Cons of Perforce
  • 16
    Hard to learn
  • 11
    Inconsistent command line interface
  • 9
    Easy to lose uncommitted work
  • 7
    Worst documentation ever possibly made
  • 5
    Awful merge handling
  • 3
    Unexistent preventive security flows
  • 3
    Rebase hell
  • 2
    When --force is disabled, cannot rebase
  • 2
    Ironically even die-hard supporters screw up badly
  • 1
    Doesn't scale for big data
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is Git?

    Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

    What is Perforce?

    Visibility, access control, workflow and code management for Git environments. Flexibility of collaborating on the same codebase and code reviews using any combination of Perforce and Git workflows and tools without compromise.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Git?
    What companies use Perforce?
    See which teams inside your own company are using Git or Perforce.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Git?
    What tools integrate with Perforce?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    Mar 24 2021 at 12:57PM

    Pinterest

    GitJenkinsKafka+7
    3
    2138
    GitJenkinsGroovy+4
    4
    2641
    GitCloudBees+2
    3
    4432
    Git.NETCloudBees+3
    6
    1065
    Mar 4 2020 at 5:14PM

    Atlassian

    GitBitbucketWindows+4
    3
    1039
    GitNode.jsFirebase+5
    7
    2354
    What are some alternatives to Git and Perforce?
    GitHub
    GitHub is the best place to share code with friends, co-workers, classmates, and complete strangers. Over three million people use GitHub to build amazing things together.
    SVN (Subversion)
    Subversion exists to be universally recognized and adopted as an open-source, centralized version control system characterized by its reliability as a safe haven for valuable data; the simplicity of its model and usage; and its ability to support the needs of a wide variety of users and projects, from individuals to large-scale enterprise operations.
    Bitbucket
    Bitbucket gives teams one place to plan projects, collaborate on code, test and deploy, all with free private Git repositories. Teams choose Bitbucket because it has a superior Jira integration, built-in CI/CD, & is free for up to 5 users.
    Mercurial
    Mercurial is dedicated to speed and efficiency with a sane user interface. It is written in Python. Mercurial's implementation and data structures are designed to be fast. You can generate diffs between revisions, or jump back in time within seconds.
    GitLab
    GitLab offers git repository management, code reviews, issue tracking, activity feeds and wikis. Enterprises install GitLab on-premise and connect it with LDAP and Active Directory servers for secure authentication and authorization. A single GitLab server can handle more than 25,000 users but it is also possible to create a high availability setup with multiple active servers.
    See all alternatives