# 11zgit-fs

> Git as a filesystem.

Latest version **0.0.10** (published 2012-11-17) · 0 weekly downloads

## Install

```sh
npm install 11zgit-fs
pnpm add 11zgit-fs
yarn add 11zgit-fs
bun add 11zgit-fs
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2012-11-17 |
| First published | 2012-11-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 205 |
| Author | Tim Caswell |
| Maintainers | sun11 |

## Links

- npm: https://www.npmjs.com/package/11zgit-fs
- Repository: https://github.com/creationix/node-git
- Issues: http://github.com/creationix/node-git/issues
- npm.io page: https://npm.io/package/11zgit-fs

## Recent versions

- 0.0.10 (latest) — 2012-11-17

## README

# node-git

This is a thin wrapper around the command-line `git` command for use inside node applications.  It's used primarily by the [wheat][] blogging system to enable a running node.JS server to read files out of a git repository as if they were local files.

## Example usage

```js
var sys = require('sys'),
    Git = require('git');


// Test it!
Git("/Users/tim/code/howtonode.org");
Git.exists("articles/control-flow-part-ii.markdown", function (err, tags) {
  if (err) { throw(err); }
  sys.p(tags);
});
Git.getTags(function (err, tags) {
  if (err) { throw(err); }
  Object.keys(tags).forEach(function (tag) {
    Git.readDir("articles", tags[tag], function (err, contents) {
      if (err) { throw(err); }
      contents.files.forEach(function (file) {
        file = Path.join("articles", file);
        Git.readFile(file, tags[tag], function (err, text) {
          if (err) { throw(err); }
          sys.error("tag: " + tag + " sha1: " + tags[tag] + " file: " + file + " length: " + text.length);
        });
      });
    });
  });
});
```

More example:

```js
var sys = require('sys');
// Git("/Users/tim/git/howtonode.org.git");
Git("/Users/tim/Code/howtonode.org");
Git.log("articles/what-is-this.markdown", function (err, data) {
  if (err) throw err;
  sys.p(data);
  process.exit();
});
```

[wheat]: http://github.com/creationix/wheat

---
_Source: https://npm.io/package/11zgit-fs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
