@fork-of/git-branch (英语)

从本地 git 仓库获取当前分支 .
希望临时失效 https://github.com/jonschlinkert/git-branch (中文(简体) )
安装
安装方式 无数字 :
$ npm install --save @fork-of/git-branch
使用量
const branch = require('@fork-of/git-branch');
可选通过 cwd(当前工作目录)作为第一个参数.
答应
branch('some/path')
.then(name => console.log('Branch:', name)) //=> 'Branch: master'
.catch(console.error);
回电
branch(function(err, name) {
if (err) throw err;
console.log('Branch:', name); //=> 'Branch: master'
});
同步
console.log('Branch:', branch.sync()); //=> 'Branch: master'
关于
捐款
拉出请求和星星总是受欢迎的. 对于错误和特性请求, 请创建一个问题。 。 。 .
运行测试
运行和审查单元测试是熟悉图书馆及其API的好办法。 您可以使用以下命令安装依赖性并运行测试:
$ npm install && npm test
大楼文件
(此工程的 readme.md 由 动词请不要直接编辑读取器。 读取器的任何改动必须在 动词 md 读取我的模板。 )
要生成读取, 请运行以下命令 :
$ npm install -g verbose/verb#dev verb-generate-readme && verb
相关项目
您可能也对这些项目感兴趣:
- git- 添加远程: 用于添加 git 远程的 API. QQ 主页
- git 用户名:根据 更多 | 主页
- 基数: JavaScript 包装器,大大简化了与 GitHub 的 API 的合作. QQ 主页
贡献者
| 提交 | 贡献者 | | -- -- -- -- -- -- -- 19岁 扬施林克特 | 6个 绿地 |
作者
乔恩·斯林克特
许可证
版权: 2018, 乔恩·斯林克特。 。 。 . 释放 MIT 许可证。 。 。 .
此文件由 动词基因读取器, v 6.0,于2018年3月09日查阅.