GenHTTP.Modules.Git 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package GenHTTP.Modules.Git --version 0.1.0
                    
NuGet\Install-Package GenHTTP.Modules.Git -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GenHTTP.Modules.Git" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GenHTTP.Modules.Git" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="GenHTTP.Modules.Git" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GenHTTP.Modules.Git --version 0.1.0
                    
#r "nuget: GenHTTP.Modules.Git, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GenHTTP.Modules.Git@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GenHTTP.Modules.Git&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=GenHTTP.Modules.Git&version=0.1.0
                    
Install as a Cake Tool

GenHTTP.Modules.Git

Serves virtual git repositories from a GenHTTP handler. Clones, fetches and pushes are answered from your own data model via the smart HTTP protocol, without a repository on disk and without the git binary.

using GenHTTP.Engine.Internal;
using GenHTTP.Modules.Git;

var git = GitServer.Create()
                   .Repository(new MyRepository()); // implements IGitRepository or IWritableGitRepository

await Host.Create()
          .Handler(git)
          .RunAsync();

// git clone http://localhost:8080/

A repository describes its branches and tags, looks up commits by their id and returns the files of a commit:

public sealed class MyRepository : IGitRepository
{

    public ValueTask<GitReferences> GetReferencesAsync() => ...;

    public ValueTask<GitCommit?> GetCommitAsync(GitObjectId id) => ...;

    public ValueTask<GitTree> GetTreeAsync(GitCommit commit) => ...;

}

Implement IWritableGitRepository to accept pushes, deciding for every pushed branch or tag whether to accept it.

Features

  • Protocol v2 (ls-refs, fetch) and v0/v1 for fetching, v0 for pushing
  • Shallow clones (--depth, --shallow-since, --shallow-exclude, --deepen, --unshallow)
  • Truncated histories (e.g. old versions deleted) are served as shallow repositories
  • Pushes with deltas, push options and messages shown as remote: ...
  • Works with all GenHTTP engines and concerns (e.g. authentication)

See the documentation for a full guide.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 151 10/5/2026
0.1.0 95 10/5/2026