GitHub - nfriend/ts-git: A naïve implementation of git, written in TypeScript. Built to help me understand how git works under the hood. (original) (raw)
ts-git
A naïve implementation of git, written in TypeScript: http://ts-git.nathanfriend.io. Built to help me understand how git works under the hood.
This implementation is heavily based on the excellent Write yourself a Git! tutorial.
Please don't actually use ts-git for anything serious 😂.
This repo contains the source the ts-git library and the ts-git demo app.
Usage
The ts-git library can be used in two ways: as an ES6 JavaScript module or as a command line utility.
JavaScript module usage
This module is designed to work both in the browser and on the server (in Node).
First, install the module:
npm install @nathanfriend/ts-git --save
Then, import and use the module:
import { TsGit } from '@nathanfriend/ts-git';
const tsGit = new TsGit();
// View the documentation in the /lib directory // of this repo for more usage details
More complete usage details can be found in the lib directory in this repo.
Command line usage
First, install the ts-git module globally:
npm install -g @nathanfriend/ts-git
Then use the ts-git command as a drop-in replacement for git:
To the see the list of available commands, run ts-git --help.
