/UseLibgit2sharp

example application uses the libgit2sharp library to create a local git repository, a commit, and a push to a remote repository

Primary LanguageC#

About

Build

This example application uses the libgit2sharp library to create a local git repository, a commit, and a push to a remote repository.

Usage (Ubuntu 22.04)

Install docker and docker compose.

Build and start the local gitea git server:

docker compose down --remove-orphans --volumes
docker compose up --build

In another shell, build and execute the example application:

dotnet run # or: docker compose run --build test

List the local repository log:

git --git-dir tmp/test/.git log --oneline

Observe the remote repository:

http://localhost:3000/jane.doe/test

Destroy everything:

docker compose down --remove-orphans --volumes

Reference