{"id":20395404,"url":"https://github.com/jpeer264/node-current-git-branch","last_synced_at":"2025-04-12T12:25:02.623Z","repository":{"id":57211094,"uuid":"87620966","full_name":"JPeer264/node-current-git-branch","owner":"JPeer264","description":"A tool to get the branch name of a specific directory","archived":false,"fork":false,"pushed_at":"2025-01-15T13:47:57.000Z","size":225,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T07:11:13.860Z","etag":null,"topics":["branch","commit","git","head","is-git","nodejs"],"latest_commit_sha":null,"homepage":null,"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/JPeer264.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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-08T08:52:05.000Z","updated_at":"2025-01-15T13:47:59.000Z","dependencies_parsed_at":"2022-09-01T04:23:11.582Z","dependency_job_id":null,"html_url":"https://github.com/JPeer264/node-current-git-branch","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fnode-current-git-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fnode-current-git-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fnode-current-git-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPeer264%2Fnode-current-git-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JPeer264","download_url":"https://codeload.github.com/JPeer264/node-current-git-branch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565712,"owners_count":21125540,"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":["branch","commit","git","head","is-git","nodejs"],"created_at":"2024-11-15T03:57:23.596Z","updated_at":"2025-04-12T12:25:02.618Z","avatar_url":"https://github.com/JPeer264.png","language":"JavaScript","readme":"# current-git-branch\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/JPeer264/node-current-git-branch/ci.yml?branch=main)](https://github.com/JPeer264/node-current-git-branch/actions/workflows/ci.yml?query=branch%3Amain)\n[![Coverage Status](https://coveralls.io/repos/github/JPeer264/node-current-git-branch/badge.svg?branch=master)](https://coveralls.io/github/JPeer264/node-current-git-branch?branch=master)\n\nGet synchronously the current branch name\n\n## Installation\n\n```sh\n$ npm i current-git-branch --save\n```\n\n## Usage\n\nReturns:\n\n- Boolean `false`: It is not a git repository\n- String: The branch name\n\n```js\nimport branchName from \"current-git-branch\";\n\nbranchName(); // false or branch name of process.cwd()\nbranchName({ cwd: \"any/git/repo\" }); // false or branch name of the directory 'any/git/repo'\nbranchName({ cwd: \"any/git/repo\", branchOptions: [\"--no-color\"] }); // alternatively, you may pass git-branch command options, either as a string or an array\n```\n\n## LICENSE\n\nMIT © [Jan Peer Stöcklmair](https://www.jpeer.at)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpeer264%2Fnode-current-git-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpeer264%2Fnode-current-git-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpeer264%2Fnode-current-git-branch/lists"}