Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Jason Waldrip
    @ben how familar are you with the git2go implementation?
    Ben Straub
    Not at all. Why?
    Marius Ungureanu
    Didn't know this existed.
    Johan Larsson
    Yo guys 👍
    Are there any good examples of git_commit_create?
    I'm dong a test to see if libgit2 supports git-lfs out of the box
    I'm not sure how to get the root tree object
    Will git_commit_create work with Git-LFS with no extra work?
    seems like it does
    Are there any examples of getting a Smuge/Filter working with libgit2 so I can support Git-LFS?
    Hope its not a silly question? New to what smudge/filters are.

    I cal load a filter based on "if (git_filter_list_load(&filters, repo, nullptr, u8"image.jpg", git_filter_mode_t::GIT_FILTER_SMUDGE, git_filter_flag_t::GIT_FILTER_DEFAULT) != 0)"

    But how do I create or load one for/from lfs?


    So I have filter callbacks working in libgit2sharp but invoking git-lfs cmds such as "git-lfs clean" doesn't do anything when staging a file.

    Here is my filter so far: https://github.com/zezba9000/Git-Game-GUI/blob/master/GitGameGUI/RepoUserControl.xaml.cs#L22

    Testing with a local GitLab server.

    It works in most cases (checkouts, merges, etc) BUT for some reason when cloning a repo "SOME" objects get there file data replaced with lfs pointers. Objects being tested are .jpg

    Any ideas?
    guess lfs isn't documented at all.... I have no idea how to use it properly with libgit2

    Ok so have git-lfs working with libgit2sharp.
    pre-push now working too: https://github.com/zezba9000/Git-Game-GUI/blob/master/GitGameGUI/ChangesUserControl.xaml.cs#L409

    Question is why do I have to pass data to "git-lfs pre-push origin master" when its not needed?

    Abayomi Osamiluyi
    hey guys
    anyone here?
    i need some help getting the commit on a lightweight tag
    return repo.getTagByName('refs/tags/v0.1.3-31-ga7a0dc4').then(tag => {
       console.log('i say again', tag.targetId())
       return repo.getCommit(tag.targetId());
    the above fails because the tag is annotated
    VS 2015 Update 3 with LibGit2Sharp. I get NuGet package update error: "Severity Code Description Project File Line Suppression State
    Error Unable to resolve dependencies. 'LibGit2Sharp.NativeBinaries 1.0.137' is not compatible with 'LibGit2Sharp 0.22.0 constraint: LibGit2Sharp.NativeBinaries (= 1.0.129)'. 0
    nvr mind, so this is normal I guess
    how do I handle the git-lfs pre-push hook?
    Are there have schedule for server side implementation?

    Are there any clearer instructions on how to build libgit2 and git2go for Windows?

    Despite the fact that I've built libgit2 and zlib manually, the git2go make process won't stop complaining about a missing zlib.pc.

    Is there any way to circumvent the pkgconfig, since I shouldn't even need that anymore anyways?

    Windows noob here, btw.

    I can't believe there are still people around who claim it's easier than GNU/Linux, Mac OS X, Solaris or any of the BSDs.

    Had git2go armed and ready on my personal machines (Mac and Ubuntu) in less than 10 minutes. Here on Windows it's been a multi-hour struggle.


    Got git2go built eventually but am now struggling with getting a proper libgit2 with SSH support.

    No matter what I do, it fails spectacularly.

    The latest chain of errors (after it took me long enough to figure out how to actually forward libssh2 to the build process) are undefined references like the following

    wincng.c:975: undefined reference to `BCryptImportKeyPair'

    Lev Lehn

    I'd like to transplant the whole tree, i.e. do something like that:

    foreach (TreeEntry entry in tree) { if (entry.Name.StartsWith("PathPart")) { entry.Name = entry.Name.Substring(8); } }

    but entry.Name is readonly. Is there a proper way to do what I want?

    Lev Lehn
    got that
    Rene Brokholm
    hello and good morning from denmark
    I have a question about libgit2sharp and merge tools/ conflict resolving .
    How is this done in libgit2sharp ? Should i use a external tool like winmerge?
    Aaron Friel

    Good afternoon, I've written a tool in Rust for mirroring repositories. It listens to GitHub webhooks, pulls the repository, and pushes it to a destination. I have some questions about libgit2, in terms of making it a better tool for mirroring repositories.

    1. How do I push a wildcard refspec, e.g.: the equivalent of git push destination '+refs/heads/*:refs/heads/*'? I get an error that this isn't a valid reference, and end up having to push individuals references likerefs/heads/master`.

    2. How best would I handle the pulling-repository deleting branches and tags, or a force push that rewrites history?

    is this active

    Hello, guys! Faced with a small problem, I use libgit2sharp in my web application and when I try to rebuild or cleanup via VS or Rider my solution I get a warning " Microsoft.Common.CurrentVersion.targets(5148, 5): [MSB3061] Unable to delete file "{path-to-git-dll}\bin\git2-ef5a385.dll". Access to the path '{path-to-git-dll}\bin\git2-ef5a385.dll' is denied."

    Anyone had the same ? Any idea how can I get rid of it without recycle web pool application
    Thank you in advance!

    Andrew Rea
    Hi - I am currently using git2go and I am trying to simulate --numstat. I am walking the revs and doing a diff between the current commit and the parent but creating the diff takes around 3 seconds. Is there any options I can specify in the diff to speed this up?
    Bouke Versteegh
    is it a big file?
    and do you know wheather the diff takes 3 secs or if its the loading of the blobs?
    ah wait, you're doing a diff between two whole trees? hmm sounds like that could take a while