Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
jagregory edited this page Sep 13, 2010 · 2 revisions

Git# API

The general aim of this project is to provide an implementation of git-core in .Net to make interfacing with Git easier for .Net developers. This means that Git# should have a clear API, and preferably one that you can easily use specific features of Git without needing too much knowledge of everything else. Users shouldn’t need to know about blobs and trees, for example.

Fundamental objects

  • Object – Absolute base class for all Git objects
  • Blob – Derives from Object, represents a Git blob (contents of a file)
  • Tree – Derives from Object, represents a Git tree (contents of a directory)
  • Tag – Derives from Object, represents a hard tag

General API “feel”

Each feature should be completely self contained, within it’s own class.

For example:


Clone.cs
Status.cs
Init.cs

These can then be used completely independently, by applications that interface with Git.

Some kind of API should be provided for stringing activities together. Perhaps a fluent-api:

Git.Init("path\to\repos")
  .Add("README.txt")
  .Add("LICENSE.txt")
  .Commit();

Additionally, at the very least we should support everything the console apps support, preferably in an easy to use manner. This will make creating a native console app implementation almost mundane.

Git.Init("path");
Git.Status();
Git.Commit("message");
Clone this wiki locally