{"id":15732512,"url":"https://github.com/jonschlinkert/list-git-branches","last_synced_at":"2025-03-13T04:31:15.827Z","repository":{"id":57290308,"uuid":"88816358","full_name":"jonschlinkert/list-git-branches","owner":"jonschlinkert","description":"List the branches for a git repository.","archived":false,"fork":false,"pushed_at":"2018-06-28T07:54:16.000Z","size":10,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T18:49:43.495Z","etag":null,"topics":["branches","git","javascript","jonschlinkert","node"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert/list-git-branches","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-20T03:23:53.000Z","updated_at":"2021-04-12T22:24:57.000Z","dependencies_parsed_at":"2022-08-24T23:40:31.205Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/list-git-branches","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Flist-git-branches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Flist-git-branches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Flist-git-branches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Flist-git-branches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/list-git-branches/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243341406,"owners_count":20275866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["branches","git","javascript","jonschlinkert","node"],"created_at":"2024-10-04T00:20:38.094Z","updated_at":"2025-03-13T04:31:15.393Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# list-git-branches [![NPM version](https://img.shields.io/npm/v/list-git-branches.svg?style=flat)](https://www.npmjs.com/package/list-git-branches) [![NPM monthly downloads](https://img.shields.io/npm/dm/list-git-branches.svg?style=flat)](https://npmjs.org/package/list-git-branches)  [![NPM total downloads](https://img.shields.io/npm/dt/list-git-branches.svg?style=flat)](https://npmjs.org/package/list-git-branches) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/list-git-branches.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/list-git-branches)\n\n\u003e List the branches for a git repository.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save list-git-branches\n```\n\nInstall with [yarn](https://yarnpkg.com):\n\n```sh\n$ yarn add list-git-branches\n```\n\n## Usage\n\n```js\nvar branches = require('list-git-branches');\nvar cwd = '.';\n\n// async\nbranches(cwd, function(err, res) {\n  if (err) throw err;\n  console.log(res);\n});\n\n// sync\nconsole.log(branches.sync(cwd));\n```\n\nYou can optionally pass an options object as the second argument, to be passed to `.exec` or `.execSync`.\n\n## About\n\n### Related projects\n\n* [gfc](https://www.npmjs.com/package/gfc): Simple way to initialize a new git repository in an empty directory, add a file… [more](https://github.com/jonschlinkert/gfc) | [homepage](https://github.com/jonschlinkert/gfc \"Simple way to initialize a new git repository in an empty directory, add a file and do a first commit (or skip that part in a directory with files). Useful for unit tests and generators.\")\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-branch](https://www.npmjs.com/package/git-branch): Get the current branch for a local git repository. | [homepage](https://github.com/jonschlinkert/git-branch \"Get the current branch for a local git repository.\")\n* [git-config-path](https://www.npmjs.com/package/git-config-path): Resolve the path to the user's local or global .gitconfig. | [homepage](https://github.com/jonschlinkert/git-config-path \"Resolve the path to the user's local or global .gitconfig.\")\n* [git-user-email](https://www.npmjs.com/package/git-user-email): Get the email address of the current user from git config. | [homepage](https://github.com/jonschlinkert/git-user-email \"Get the email address of the current user from git config.\")\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* [git-username](https://www.npmjs.com/package/git-username): Get the username from a git remote origin URL. | [homepage](https://github.com/jonschlinkert/git-username \"Get the username from a git remote origin URL.\")\n* [list-git-remotes](https://www.npmjs.com/package/list-git-remotes): List the remotes for a local git repository. Sync and async. | [homepage](https://github.com/jonschlinkert/list-git-remotes \"List the remotes for a local git repository. Sync and async.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n### Building docs\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 \u0026\u0026 verb\n```\n\n### Running tests\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 \u0026\u0026 npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](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.5.0, on April 19, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Flist-git-branches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Flist-git-branches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Flist-git-branches/lists"}