GitStatusUtils
- Class Methods
- getStatus
module.exports = class GitStatusUtils
GitStatusUtils
GitStatusUtils Class Methods:
getStatus(dirName='.')
Returns a javascript object of information from calling git status, like:
12345678910111213141516171819 {
branch:
"master"
remote:
"origin/master"
commitsAheadBehind: -5
stagedChanges: [
"new file: docs/api/index.html"
"modified: package.json"
...
]
unstagedChanges: [{
"deleted: relative/path/to/file.ext"
...
}]
untrackedFiles: [
"path/to/file.txt"
"another-path/to/file.txt"
...
]
}
Note that remote and commitsAheadBehind are not always given by git status, for example, files a local branch with no tracking remote