Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nowzoo/git-get-status
Small node.js utility for parsing git status --porcelain
https://github.com/nowzoo/git-get-status
Last synced: 11 days ago
JSON representation
Small node.js utility for parsing git status --porcelain
- Host: GitHub
- URL: https://github.com/nowzoo/git-get-status
- Owner: nowzoo
- Created: 2015-06-26T19:12:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-27T14:38:05.000Z (over 9 years ago)
- Last Synced: 2024-10-13T14:14:46.120Z (about 1 month ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-get-status
A small node.js utility for parsing `git status --porcelain`.## Install
```
$ npm install git-get-status
```## Usage
```
var git_get_status = require('git-get-status');git_get_status(function(err, result){
var status = result;
});
```## The `status` object
```
{
// the local branch...
local_branch: 'master',
// the remote branch, if any...
remote_branch: 'origin/master',
// whether and by how many commits the local branch is
// ahead or behind the remote. If the local and remote
// branch are caught up, this will be null
remote_diff: 'ahead 1',
// if there are unadded or uncommited local changes,
// clean will be false. Otherwise clean will be true.
clean: true,
// a list of unadded or uncommited files
files: []
}
```