This is part of the [ES-Git](https://github.com/es-git/es-git) project.

Downloads in past


0.10.02 years ago5 years agoMinified + gzip package size for @es-git/node-fs-repo in KB


This is part of the ES-Git project.


```bash npm install --save @es-git/node-fs-repo ```


This is an implementation of IRawRepo that uses the file system for storage. It uses the node fs and therefore really only works on the server. Use this to interface with an existing git repo created with the git cli. important: you should use the zlib-mixin if you want to load an existing git repo created with the git cli. ```ts import Repo from '@es-git/node-fs-repo'; const repo = new Repo(dirname + '/.git'); await repo.init(); ```

constructor(path : string)

Creates the repository instance. The path parameter points to a location in the filesystem where either a repo already exists or a new one should be made.

init() : Promise<void>

Initialize a new empty repository at the path provided in the constructor.