promisify-git
v1.1.22
Published
This library aims to operate git repo locally in promisifying way.
Downloads
8
Readme
promisify-git
This library aims to operate git repo locally in promisifying way.
if you get any bugs or improvements, please check this repo and make it better. Making a pull request is preferred.
install
npm install promisify-git -S
usage
var git = require('promisify-git');
git
.getBranch()
.then(function(branch) {
console.log(branch);
})
.catch(function(e) {
console.log(e);
})
git
.getTags()
.then(function(tags) {
console.log(tags);
})
.catch(function(e) {
console.log(e);
})
//you can specify any git working directory with parameter **cwd**
git
.getBranches({
gcwd: gcwd //optional, a specific git working directory , default is process.cwd
})
.then(function(branches) {
console.log(branches);
})
.catch(function(e) {
console.log(e);
})
API
tag
- hasTag(tagName,[options])
- addTag(tagName,[options])
- updateTag(new_tagName,[options])
- delTag(tagName,[options])
- getTags([options])
branch
- hasBranch(branchName,[options])
- addBranch(branchName,[options])
- delBranch(branchName,[options])
- updateBranch(oldBranch,newBranch,[options])
- getBranch([options])
- getBranches([options])
continuing...