Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nfriend/ts-git
A naïve implementation of git, written in TypeScript. Built to help me understand how git works under the hood.
https://github.com/nfriend/ts-git
Last synced: about 1 month ago
JSON representation
A naïve implementation of git, written in TypeScript. Built to help me understand how git works under the hood.
- Host: GitHub
- URL: https://github.com/nfriend/ts-git
- Owner: nfriend
- License: mit
- Created: 2019-10-01T01:17:54.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-25T04:57:15.000Z (almost 4 years ago)
- Last Synced: 2024-04-17T02:14:13.002Z (5 months ago)
- Language: TypeScript
- Homepage: https://ts-git.nathanfriend.io/
- Size: 630 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ts-git
A naïve implementation of [git](https://git-scm.com/), written in [TypeScript](https://www.typescriptlang.org/): 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!](https://wyag.thb.lt/#org94e7cd7) tutorial.
Please don't actually use `ts-git` for anything serious :joy:.
This repo contains the source the [`ts-git` library](./lib) and the [`ts-git` demo app](./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:
```bash
npm install @nathanfriend/ts-git --save
```Then, import and use the module:
```ts
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`](./lib) directory in this repo.
### Command line usage
First, install the `ts-git` module globally:
```bash
npm install -g @nathanfriend/ts-git
```Then use the `ts-git` command as a drop-in replacement for `git`:
```bash
ts-git init
```To the see the list of available commands, run `ts-git --help`.