{"_id":"git-branch","_rev":"77161","name":"git-branch","description":"Get the current branch from the local git repository.","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:24:50.000Z","created":"2014-04-04T16:10:26.181Z","2.0.1":"2018-03-09T18:48:06.924Z","2.0.0":"2018-03-09T16:47:48.055Z","1.0.0":"2017-06-02T08:28:37.379Z","0.3.0":"2015-03-09T21:47:05.201Z","0.2.0":"2015-02-25T12:26:29.368Z","0.1.2":"2014-04-04T16:13:33.078Z","0.1.1":"2014-04-04T16:12:10.379Z","0.1.0":"2014-04-04T16:10:26.181Z"},"users":{"orlenka":true,"efreak":true},"author":{"name":"Jon Schlinkert","url":"http://github.com/https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/git-branch.git"},"versions":{"2.0.1":{"name":"git-branch","description":"Get the current branch from the local git repository.","version":"2.0.1","homepage":"https://github.com/jonschlinkert/git-branch","author":{"name":"Jon Schlinkert","url":"http://github.com/https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/git-branch.git"},"bugs":{"url":"https://github.com/jonschlinkert/git-branch/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=8"},"scripts":{"test":"mocha"},"dependencies":{"findup-sync":"^2.0.0"},"devDependencies":{"gfc":"^2.0.1","gulp-format-md":"^1.0.0","mocha":"^3.5.3","rimraf":"^2.6.2"},"keywords":["branch","git"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["git-add-remote","git-user-name","github-base"]},"lint":{"reflinks":true}},"gitHead":"86511e76ca785e5a176c8ed64ddd0cf9cdf718d0","_id":"git-branch@2.0.1","_npmVersion":"5.7.1","_nodeVersion":"9.7.1","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"442724a97574c66ede4290ded75b7430785da08f","size":3010,"noattachment":false,"key":"/git-branch/-/git-branch-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-branch/download/git-branch-2.0.1.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/git-branch_2.0.1_1520621286661_0.9551298369906045"},"_hasShrinkwrap":false,"publish_time":1520621286924,"_cnpm_publish_time":1520621286924},"2.0.0":{"name":"git-branch","description":"Get the current branch from the local git repository.","version":"2.0.0","homepage":"https://github.com/jonschlinkert/git-branch","author":{"name":"Jon Schlinkert","url":"http://github.com/https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/git-branch.git"},"bugs":{"url":"https://github.com/jonschlinkert/git-branch/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=6"},"scripts":{"test":"mocha"},"dependencies":{"findup-sync":"^2.0.0"},"devDependencies":{"gfc":"^2.0.1","gulp-format-md":"^1.0.0","mocha":"^3.5.3","rimraf":"^2.6.2"},"keywords":["branch","git"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["git-add-remote","git-user-name","github-base"]},"lint":{"reflinks":true}},"gitHead":"86511e76ca785e5a176c8ed64ddd0cf9cdf718d0","_id":"git-branch@2.0.0","_npmVersion":"5.7.1","_nodeVersion":"9.7.1","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"55ea87dd4edc6d170f8513b4c7dca7427e2196a3","size":3009,"noattachment":false,"key":"/git-branch/-/git-branch-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-branch/download/git-branch-2.0.0.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/git-branch_2.0.0_1520614067988_0.4936367497667642"},"_hasShrinkwrap":false,"publish_time":1520614068055,"_cnpm_publish_time":1520614068055},"1.0.0":{"name":"git-branch","description":"Get the current branch for a local git repository.","version":"1.0.0","homepage":"https://github.com/jonschlinkert/git-branch","author":{"name":"Jon Schlinkert","url":"http://github.com/https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/git-branch.git"},"bugs":{"url":"https://github.com/jonschlinkert/git-branch/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.8"},"scripts":{"test":"mocha"},"keywords":["branch","current branch","gh","git","git branch","repo","repository"],"devDependencies":{"gulp-format-md":"^0.1.12"},"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["github-base","git-add-remote","git-user-name"]},"lint":{"reflinks":true}},"gitHead":"aa4f9915ff7a7ab0c3a26db6fff92d5d2bcda4ac","_id":"git-branch@1.0.0","_npmVersion":"5.0.1","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"64cc7dd75da2d81a9d4679087c1f8b56e6bd2d3d","size":2684,"noattachment":false,"key":"/git-branch/-/git-branch-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-branch/download/git-branch-1.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/git-branch-1.0.0.tgz_1496392116413_0.708092651097104"},"directories":{},"publish_time":1496392117379,"_cnpm_publish_time":1496392117379,"_hasShrinkwrap":false},"0.3.0":{"name":"git-branch","description":"Get the current branch for a local git repository.","version":"0.3.0","homepage":"https://github.com/jonschlinkert/git-branch","author":{"name":"Jon Schlinkert","url":"http://github.com/https://github.com/jonschlinkert/"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/git-branch.git"},"bugs":{"url":"https://github.com/jonschlinkert/git-branch/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/git-branch/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.8"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"*"},"keywords":["git","gh","branch","git branch","current branch","repository","repo"],"gitHead":"3710e8f9965ed59fb4aff794750321668b1fce62","_id":"git-branch@0.3.0","_shasum":"cae53f599054d2bd4773e164550f54cc5fe53d2c","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"cae53f599054d2bd4773e164550f54cc5fe53d2c","size":2239,"noattachment":false,"key":"/git-branch/-/git-branch-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-branch/download/git-branch-0.3.0.tgz"},"directories":{},"publish_time":1425937625201,"_cnpm_publish_time":1425937625201,"_hasShrinkwrap":false},"0.2.0":{"name":"git-branch","description":"Get the current branch for a local git repository.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/git-branch","author":{"name":"Jon Schlinkert","url":"http://github.com/https://github.com/jonschlinkert/"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/git-branch.git"},"bugs":{"url":"https://github.com/jonschlinkert/git-branch/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/git-branch/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.8"},"scripts":{"test":"mocha"},"dependencies":{"parse-git-config":"^0.1.0"},"keywords":["git","gh","branch","git branch","current branch","repository","repo"],"gitHead":"2eaad5de722f702b4d73ce3ca905ce5d7c948095","_id":"git-branch@0.2.0","_shasum":"8de5d393b75595d974490b65c0a9dc6c055bb5db","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"8de5d393b75595d974490b65c0a9dc6c055bb5db","size":1677,"noattachment":false,"key":"/git-branch/-/git-branch-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-branch/download/git-branch-0.2.0.tgz"},"directories":{},"publish_time":1424867189368,"_cnpm_publish_time":1424867189368,"_hasShrinkwrap":false},"0.1.2":{"name":"git-branch","description":"Get the current branch for a local git repository.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/git-branch","author":{"name":"Jon Schlinkert","url":"http://github.com/https://github.com/jonschlinkert/"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/git-branch.git"},"bugs":{"url":"https://github.com/jonschlinkert/git-branch/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/git-branch/blob/master/LICENSE-MIT"}],"keywords":["git","gh","branch","git branch","current branch","repository","repo"],"main":"index.js","engines":{"node":">=0.8"},"scripts":{"test":"mocha -R test"},"devDependencies":{"verb":"~0.2.0"},"dependencies":{"shelljs":"~0.2.6"},"_id":"git-branch@0.1.2","dist":{"shasum":"24ed8d243be491b1d23f290c100f96ecfd9d1ab4","size":2288,"noattachment":false,"key":"/git-branch/-/git-branch-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-branch/download/git-branch-0.1.2.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1396628013078,"_cnpm_publish_time":1396628013078,"_hasShrinkwrap":false},"0.1.1":{"name":"git-branch","description":"Get the current branch for a local git repository.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/git-branch","author":{"name":"Jon Schlinkert","url":"http://github.com/https://github.com/jonschlinkert/"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/git-branch.git"},"bugs":{"url":"https://github.com/jonschlinkert/git-branch/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/git-branch/blob/master/LICENSE-MIT"}],"keywords":["docs","documentation","generate","generator","markdown","templates","verb"],"main":"index.js","engines":{"node":">=0.8"},"scripts":{"test":"mocha -R test"},"devDependencies":{"verb":"~0.2.0"},"dependencies":{"shelljs":"~0.2.6"},"_id":"git-branch@0.1.1","dist":{"shasum":"8939dd622ee12a040b919f9655e544cbd5f28633","size":2303,"noattachment":false,"key":"/git-branch/-/git-branch-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-branch/download/git-branch-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1396627930379,"_cnpm_publish_time":1396627930379,"_hasShrinkwrap":false},"0.1.0":{"name":"git-branch","description":"Get the current branch for a local git repository.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/git-branch","author":{"name":"Jon Schlinkert","url":"http://github.com/https://github.com/jonschlinkert/"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/git-branch.git"},"bugs":{"url":"https://github.com/jonschlinkert/git-branch/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/git-branch/blob/master/LICENSE-MIT"}],"keywords":["docs","documentation","generate","generator","markdown","templates","verb"],"main":"index.js","engines":{"node":">=0.8"},"scripts":{"test":"mocha -R test"},"devDependencies":{"verb":"~0.2.0"},"dependencies":{"shelljs":"~0.2.6"},"_id":"git-branch@0.1.0","dist":{"shasum":"1ed36f3710888d87043414ea1479a83cba07763d","size":2311,"noattachment":false,"key":"/git-branch/-/git-branch-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-branch/download/git-branch-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1396627826181,"_cnpm_publish_time":1396627826181,"_hasShrinkwrap":false}},"readme":"# git-branch [![NPM version](https://img.shields.io/npm/v/git-branch.svg?style=flat)](https://www.npmjs.com/package/git-branch) [![NPM monthly downloads](https://img.shields.io/npm/dm/git-branch.svg?style=flat)](https://npmjs.org/package/git-branch) [![NPM total downloads](https://img.shields.io/npm/dt/git-branch.svg?style=flat)](https://npmjs.org/package/git-branch) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/git-branch.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/git-branch)\n\n> Get the current branch from the local git repository.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save git-branch\n```\n\n## Usage\n\n```js\nconst branch = require('git-branch');\n```\n\nOptionally pass the cwd (current working directory) as the first argument.\n\n**Promise**\n\n```js\nbranch('some/path')\n  .then(name => console.log('Branch:', name)) //=> 'master'\n  .catch(console.error);\n```\n\n**Callback**\n\n```js\nbranch(function(err, name) {\n  if (err) throw err;\n  console.log('Branch:', name); //=> 'master'\n});\n```\n\n**Sync**\n\n```js\nconsole.log('Branch:', branch.sync()); //=> 'master'\n```\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [git-add-remote](https://www.npmjs.com/package/git-add-remote): API for adding git remotes. | [homepage](https://github.com/jonschlinkert/git-add-remote \"API for adding git remotes.\")\n* [git-user-name](https://www.npmjs.com/package/git-user-name): Get a user's name from git config at the project or global scope, depending on… [more](https://github.com/jonschlinkert/git-user-name) | [homepage](https://github.com/jonschlinkert/git-user-name \"Get a user's name from git config at the project or global scope, depending on what git uses in the current context.\")\n* [github-base](https://www.npmjs.com/package/github-base): JavaScript wrapper that greatly simplifies working with GitHub's API. | [homepage](https://github.com/jonschlinkert/github-base \"JavaScript wrapper that greatly simplifies working with GitHub's API.\")\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 19 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 6 | [emilrowland](https://github.com/emilrowland) |\n\n### Author\n\n**Jon Schlinkert**\n\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](http://github.com/https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on March 09, 2018._","_attachments":{},"homepage":"https://github.com/jonschlinkert/git-branch","bugs":{"url":"https://github.com/jonschlinkert/git-branch/issues"},"license":"MIT"}