{"id":22976494,"url":"https://github.com/interviewstreet/gittle.js","last_synced_at":"2025-04-02T08:20:55.531Z","repository":{"id":148355028,"uuid":"74454312","full_name":"interviewstreet/gittle.js","owner":"interviewstreet","description":"Gittle","archived":false,"fork":false,"pushed_at":"2016-11-22T09:08:43.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":79,"default_branch":"master","last_synced_at":"2025-02-07T23:27:06.684Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interviewstreet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-22T09:06:52.000Z","updated_at":"2016-12-13T09:39:58.000Z","dependencies_parsed_at":"2023-05-19T20:45:17.492Z","dependency_job_id":null,"html_url":"https://github.com/interviewstreet/gittle.js","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interviewstreet%2Fgittle.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interviewstreet%2Fgittle.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interviewstreet%2Fgittle.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interviewstreet%2Fgittle.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interviewstreet","download_url":"https://codeload.github.com/interviewstreet/gittle.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246777791,"owners_count":20832033,"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":[],"created_at":"2024-12-15T00:51:33.528Z","updated_at":"2025-04-02T08:20:55.522Z","avatar_url":"https://github.com/interviewstreet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Gittle\n=========\n\nA simple Node.js wrapper for the Git CLI. The API uses promises. This library is used in [Codebox](https://github.com/FriendCode/codebox).\n\n### Installation\n\n```\nnpm install gittle\n```\n\n### How to use it?\n\n```javascript\nvar Gittle = require(\"gittle\");\n```\n\n* Load a repository: ```var repo = new Gittle(\"./\");```\n* Clone a repository: ```Gittle.clone(\"https://github.com/FriendCode/gittle.js.git\", \"./test\")```\n* Initialize an empty repository: ```Gittle.init(\"./test\")```\n\nCheck out [Authentication](#authentication) about how to configure https/ssh authentication for cloning.\n\n* * *\n\n### Repository:\n\n##### Status\n\n* Get status: ```repo.status()```\n\n##### Identity\n\n* Get identity: ```repo.identity()```, Returns an [Actor](#actor) object\n* Set identity: ```repo.identify(actor)```, actor is an object like: ```{name: \"\", email: \"\"}```\n\n##### Push/pull\n\n* Pull: ```repo.pull(remote, branch)```\n* Push: ```repo.push(remote, branch)```\n* Fetch: ```repo.fetch(remote)```\n\nCheck out [Authentication](#authentication) about how to configure https/ssh authentication.\n\n##### Commits\n\nA commit is representated by a [Commit](#commit) object.\n\n* List all commits: ```repo.commits(start, limit, skip)```\n* Commit changes: ```repo.commit(message, options)```\n\n##### Tags\n\n* List all tags: ```repo.tags()```\n* Create a new tag: ```repo.create_tag(name, options)```\n* Delete a tag: ```repo.delete_tag(name)```\n\n##### Branches\n\nA branch is representated by a [Head](#ref) object.\n\n* List all branches: ```repo.branches()```\n* Get a branch from its name: ```repo.branche(name)```\n* Create a branch: ```repo.create_branch(name)```\n* Delete a branch: ```repo.delete_branch(name)```\n\n##### Remotes\n\n* List all remotes: ```repo.remotes()```\n* Add a remote: ```repo.remore_add(name, url)```\n* Delete a remote: ```repo.remote_remove(name)```\n\n* * *\n\n### Commit\n\n* ```commit.id```: (String) id for this commit\n* ```commit.author```: ([Actor](#actor)) author of this commit\n* ```commit.commiter```: ([Actor](#actor)) commiter of this commit\n* ```commit.message```: (String) message for this commit\n* ```commit.authored_date```: (String) date when the commit was authored\n* ```commit.committed_date```: (String) date when the commit was commited\n* Get the files tree for this commit: ```commit.tree()```\n* Get the parents commits: ```commit.parents()```\n\n* * *\n\n### Actor\n\n* ```actor.name```: (String) name of this actor\n* ```actor.email```: (String) email address of this actor\n* ```actor.hash```: (String) hash of this actor (md5 hash of the email)\n\n* * *\n\n### Ref\n\nClass **Head** inherit from **Ref**.\n\n* ```ref.name```: (String) name of this reference\n* ```ref.commit```: ([Commit](#commit)) commit related to this ref.\n\n* * *\n\n### Authentication\n\nA last argument could be use for authentication on ```Gittle.clone```, ```repo.push```, ```repo.pull```, ```repo.fetch```:\n```javascript\n{\n    // SSH:\n    'passphrase': \"...\",\n    'refuseUnknownHost': true, // Default is false\n    \n    // HTTPS:\n    'username': \"...\",\n    'password': \"...\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterviewstreet%2Fgittle.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterviewstreet%2Fgittle.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterviewstreet%2Fgittle.js/lists"}