libgit2 VS git

Compare libgit2 vs git and see what are their differences.

libgit2

A cross-platform, linkable library implementation of Git that you can use in your application. (by libgit2)

git

A fork of Git containing Microsoft-specific patches. (by microsoft)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
libgit2 git
30 10
9,429 722
0.8% 2.1%
9.6 0.0
5 days ago 10 days ago
C C
GNU General Public License v3.0 or later GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

libgit2

Posts with mentions or reviews of libgit2. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-05.
  • Radicle: Open-Source, Peer-to-Peer, GitHub Alternative
    8 projects | news.ycombinator.com | 5 Mar 2024
    Everything that is replicated on the network is stored as a Git object, using the libgit2[0] library. This library uses hardened SHA-1 internally, which is called sha1dc (for "detect collision").

    [0]: https://github.com/libgit2/libgit2/blob/ac0f2245510f6c75db1b...

  • Speedbump – a TCP proxy to simulate variable network latency
    3 projects | news.ycombinator.com | 16 Jan 2024
    This is delightful and I can't wait to try it out. Right now, the libgit2 project (https://github.com/libgit2/libgit2) has a custom HTTP git server wrapper that will throttle the responses down to a very slow rate. It's fun watching a `git clone` running over 2400 baud modem speeds, but it's actually been incredibly helpful for testing timeouts, odd buffering problems, and other things that crop up in weird network environments.

    I'd love to jettison our hacky custom code and use something off-the-shelf instead.

  • Things I just don't like about Git
    6 projects | news.ycombinator.com | 8 Oct 2023
  • GitKraken Client Is Migrating from Libgit2 to the Git Executable
    1 project | news.ycombinator.com | 29 Aug 2023
    I've built a UI on top of libgit2 and I wish that this blog post expanded on which new features are missing (sparse checkout?).

    To quote: "The migration to Git Executable will allow us to resolve long-standing issues with GitKraken Client, such as poor LFS performance, SSH configuration support and many other features/performance improvements."

    I agree on LFS performance on Windows. SSH config support is a pain due to libssh2 but openssh support is on the way (https://github.com/libgit2/libgit2/pull/6617).

    There are many cons to using the Git executable itself (parsing output, error reporting, version handling). Seems to me that there's more to this?

  • Mold 2.0.0
    4 projects | news.ycombinator.com | 26 Jul 2023
    I'm curious about the license change? This is an executable is it not? Invoking it as a separate process does not require you make the software calling it GPL so switching to MIT should have no affect in the common case.

    If the authors really wanted a more permissive license, then instead of relicensing from AGPL to MIT they should have gone AGPL with linking exception. An example of a project that does this is libgit2 [1]. This licensing is more permissive but still permits the author to sell commercial licenses to those making closed-source code changes.

    [1] https://github.com/libgit2/libgit2#license

  • Shadow cloning support landed in libgit2
    1 project | news.ycombinator.com | 9 May 2023
  • I'm feeling lazy today but want a better excuse than "working on documention" for the morning standup.
    2 projects | /r/sysadmin | 26 Apr 2023
    Using libxlsxwriter and libgit, it's straightforward -- just putting the equivalent of git shortlog and lines added and removed into a line of cells.
  • libgit2 fails to verify SSH keys by default
    1 project | /r/bag_o_news | 22 Jan 2023
    1 project | /r/netsec | 20 Jan 2023
    1 project | /r/netsec | 20 Jan 2023

git

Posts with mentions or reviews of git. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-10.
  • Ask HN: Can we do better than Git for version control?
    17 projects | news.ycombinator.com | 10 Dec 2023
    Microsoft had a bunch of solutions to handle their massive Windows repo: VFS for Git (GVFS), Scalar, and now it has a bunch of MS specific patches on top of the official git client, but apparently that one is also not required any more as partial clone is now supported on azure as well (which is another such implementation from Microsoft employees that made it to both GitHub and upstream git).

    https://github.blog/2020-01-17-bring-your-monorepo-down-to-s...

    https://devblogs.microsoft.com/devops/introducing-scalar/

    https://github.com/microsoft/git

    https://devblogs.microsoft.com/devops/git-partial-clone-now-...

  • We Put Half a Million Files in One Git Repository, Here's What We Learned (2022)
    4 projects | news.ycombinator.com | 28 Aug 2023
    That was discontinued (like multiple times under different names). And is moved into a git fork. https://github.com/microsoft/git
  • How to convince management that something like Git is industry standard?
    10 projects | /r/sysadmin | 5 Jul 2022
  • Improve Git monorepo performance with a file system monitor
    6 projects | news.ycombinator.com | 29 Jun 2022
    Interesting! It seems some of Scalar from late 2021 has already made it into the official git project's contrib dir [0]. It looks like Scalar is mostly an opinionated way to configure git [1], especially by using git partial-clone.

    Git partial-clone looks almost perfect, except it only downloads and displays files explicitly added to the git sparse-checkout list. I want some "magic" vfs shenanigans that lets me view and browse the full repo exactly as if the full repo where checked out, but when I open a directory or file the contents are downloaded on-demand.

    [0]: https://github.com/git/git/tree/master/contrib/scalar

    [1]: https://github.com/microsoft/git/blob/vfs-2.37.0/Documentati...

  • GitHub incident: 2022/03/24
    1 project | news.ycombinator.com | 24 Mar 2022
    Ironically, Microsoft has been a major contributor to improvements in git for handling large repos after Windows was migrated to git.

    https://github.com/microsoft/git

  • The largest Git repo on the planet (2017)
    1 project | news.ycombinator.com | 26 Jan 2022
    300GB git repo... anyway, good to see there's work for merge in back to git proper, though it seems like that is still a work in progress (maybe) as https://github.com/Microsoft/git/ still seems pretty active.
  • Make your monorepo feel small with Git’s sparse index
    7 projects | news.ycombinator.com | 11 Nov 2021
    This is well written and deserves my upvote, because sparse-checkout is part of git and knowing how it works is useful.

    That said, there's absolutely no reason to structure your code in a monorepo.

    Here's what I think GitHub is doing:

    1) Encourage monorepo adoption

    2) Build tooling for monorepos

    3) Selling tooling to developers stranded in monorepos

    Microsoft, which owns GitHub, created the microsoft/git fork linked in the article, and they explain their justification here: https://github.com/microsoft/git#why-is-this-fork-needed

    > Well, because Git is a distributed version control system, each Git repository has a copy of all files in the entire history. As large repositories, aka monorepos grow, Git can struggle to manage all that data. As Git commands like status and fetch get slower, developers stop waiting and start switching context. And context switches harm developer productivity.

    I believe that Google's brand is so big that it led to this mass cognitive dissonance, which is being exploited by GitHub.

    To be clear, here are the two ideas in conflict:

    * Git is decentralized and fast, and Google famously doesn't use it.

    * Companies want to use "industry standard" tech, and Google is the standard for success.

    Now apply those observations to a world where your engineers only use "git".

    The result is market demand to misuse git for monorepos, which Microsoft is pouring huge amounts of resources into enabling via GitHub.

    It makes great sense that GitHub wants to lean into this. More centralization and being more reliant on GitHub's custom tooling is obviously better for GitHub.

    It just so happens that GitHub is building tools to enable monorepos, essentially normalizing their usage.

    Then GitHub can sell tools to deal with your enormous monorepo, because your traditional tools will feel slow and worse than GitHub's tools.

    In other words, GitHub is propping up the failed monorepo idea as a strategy to get people in the pipeline for things like CodeSpaces: https://github.com/features/codespaces

    Because if you have 100 projects and they're all separate, you can do development locally for each and it's fast and sensible. But if all your projects are in one repo, the tools grind to a halt, and suddenly you need to buy a solution that just works to meet your business goals.

  • Gitfs: Version Controlled File System
    7 projects | news.ycombinator.com | 22 Aug 2021
    VFS for Git was superceded by https://github.com/microsoft/scalar and then many of the features were merged into mainline git, so what is left now is a thin shell around git features in the form of MS's forked git binary: https://github.com/microsoft/git

What are some alternatives?

When comparing libgit2 and git you can also consider the following projects:

pygit2 - Python bindings for libgit2

gitfs - Version controlled file system

elfshaker - elfshaker stores binary objects efficiently

VFSForGit - Virtual File System for Git: Enable Git at Enterprise Scale

git-branchless - High-velocity, monorepo-scale workflow for Git

scalar - Scalar: A set of tools and extensions for Git to allow very large monorepos to run on Git without a virtualization layer

horde - Horde is a distributed Supervisor and Registry backed by DeltaCrdt

mvfs - ClearCase file system

git-date - Bindings onto the date parsing code from Git

git-fs - fuse + libgit2

pygooglenews - If Google News had a Python library

Git - Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documentation/SubmittingPatches procedure for any of your improvements.