{"id":23449537,"url":"https://github.com/danielmahon/gift","last_synced_at":"2026-03-03T20:31:09.684Z","repository":{"id":2769624,"uuid":"3768292","full_name":"danielmahon/gift","owner":"danielmahon","description":"A simple Node.js wrapper for the Git CLI.","archived":false,"fork":false,"pushed_at":"2012-08-29T16:49:29.000Z","size":146,"stargazers_count":1,"open_issues_count":0,"forks_count":75,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T21:08:33.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":false,"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/danielmahon.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}},"created_at":"2012-03-19T20:29:00.000Z","updated_at":"2013-01-08T07:12:58.000Z","dependencies_parsed_at":"2022-08-20T01:12:04.513Z","dependency_job_id":null,"html_url":"https://github.com/danielmahon/gift","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/danielmahon/gift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmahon%2Fgift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmahon%2Fgift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmahon%2Fgift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmahon%2Fgift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielmahon","download_url":"https://codeload.github.com/danielmahon/gift/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmahon%2Fgift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30058263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-23T23:19:38.062Z","updated_at":"2026-03-03T20:31:09.645Z","avatar_url":"https://github.com/danielmahon.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gift\n\n[![Build Status](https://secure.travis-ci.org/sentientwaffle/gift.png?branch=master)](http://travis-ci.org/sentientwaffle/gift)\n\nA simple Node.js wrapper for the Git CLI. The API is based on\n[Grit](https://github.com/mojombo/grit)\n\n# Installation\n\n    $ npm install gift\n\n# API\n\n    git  = require 'gift'\n    \n    repo = git \"path/to/repo\"\n    # =\u003e #\u003cRepo\u003e\n\n## Repo\n### `Repo#path`\n`String` - The path to the repository.\n\n### `Repo#commits([treeish, [limit, [skip, ]]]callback)`\nGet a list of commits.\n\n  * `treeish`  - `String`  (optional).\n  * `limit`    - `Integer` (optional).\n  * `skip`     - `Integer` (optional).\n  * `callback` - `Function` which receives `(err, commits)`, where `commits` is\n                 an `Array` of `Commit`s.\n\nGet the 10 most recent commits to master.\n\n    repo.commits (err, commits) -\u003e\n\nOr to a different tag or branch.\n\n    repo.commits \"v0.0.3\", (err, commits) -\u003e\n\nLimit the maximum number of commits returned.\n\n    repo.commits \"master\", 30, (err, commits) -\u003e\n\nSkip some (for pagination):\n\n    repo.commits \"master\", 30, 30, (err, commits) -\u003e\n\n### `Repo#tree([treeish]) =\u003e Tree`\nThe `Tree` object for the treeish (which defaults to \"master\").\n\n    repo.tree().contents (err, children) -\u003e\n      for child in children\n        console.log child.name\n\n### `Repo#diff(commitA, commitB, [paths, ]callback)`\nGet the difference between the trees.\n\nThe callback receives `(err, diffs)`.\n\n### `Repo#remotes(callback)`\nGet the repository's remotes.\n\nReceives `(err, remotes)`, where each remote is a Ref.\n\n### `Repo#remote_list(callback)`\nGet a list of the repository's remote names.\n\nGet the string names of each of the remotes.\n\n### `Repo#remote_add(name, url, callback)`\nEquivalent to `git remote add \u003cname\u003e \u003curl\u003e`.\n\n### `Repo#remote_fetch(name, callback)`\n`git fetch \u003cname\u003e`\n\n\n### `Repo#status(callback)`\nThe callback receives `(err, status)`.\n\n### `Repo#create_branch(name, callback)`\nCreate a new branch with `name`, and call the callback when complete\nwith an error, if one occurred.\n\n### `Repo#delete_branch(name, callback)`\nDelete the branch `name`, and call the callback with an error, if one occurred.\n\n### `Repo#tags(callback)`\nGet a list of `Tag`s.\n\n### `Repo#create_tag(name, [options, ]callback)`\nCreate a tab with the given name.\n\n### `Repo#delete_tag(name, callback)`\nDelete the tag with the given name.\n\n### `Repo#branches(callback)`\n`callback` receives `(err, heads)`.\n\n### `Repo#create_branch(name, callback)`\nCreate a branch with the given name.\n\n### `Repo#delete_branch(delete, callback)`\nDelete the branch with the given name.\n\n### `Repo#branch([branch, ]callback)`\nGet a branch.\n\n  * `branch`   - The name of the branch to get. Defaults to the\n                 currently checked out branch.\n  * `callback` - Receives `(err, head)`.\n\n\n### `Repo#commit(message, [options, ]callback)`\nCommit some changes.\n\n  * `message`  - `String`\n  * `options`  -\n    - `all`    - `Boolean`\n    - `amend`  - `Boolean`\n  * `callback` - Receives `(err)`.\n\n### `Repo#add(files, callback)`\n`git add \u003cfiles\u003e`\n\n### `Repo#remove(files, callback)`\n`git rm \u003cfiles\u003e`\n\n### `Repo#checkout(treeish, callback)`\n`git checkout \u003ctreeish\u003e`\n\n## Commit\n### `Commit#id`\n`String` - The commit's SHA.\n\n### `Commit#parents`\n`Commit[]`\n\n### `Commit#tree(callback)`\n\n  * `callback` - Receives `(err, tree)`.\n\n### `Commit#author`\n`Actor`\n### `Commit#authored_date`\n`Date`\n### `Commit#committer`\n`Actor`\n### `Commit#committed_date`\n`Date`\n### `Commit#message`\n`String`\n\n\n## Head\n### `Head#name`\n`String`\n\n### `Head#commit`\n`Commit`\n\n## Tag\n### `Tag#name`\n`String`\n\n### `Tag#commit`\n`Commit`\n\n### `Tag#message(callback)`\nThe callback receives `(err, message)` (`message` is a String).\n\n### `Tag#tagger(callback)`\nThe callback receives `(err, actor)`.\n\n### `Tag#tag_date(callback)`\nThe callback receives `(err, date)`.\n\n## Status\n### `Status#clean`\n`Boolean`\n\n### `Status#files`\n`Object` - The keys are files, the values objects indicating whether or not\nthe file is staged, tracked, etc.\n\nEach file has the following properties:\n\n  * `type`    - \"A\" for added, \"M\" for modified, \"D\" for deleted.\n  * `staged`  - `Boolean`\n  * `tracked` - `Boolean`\n\n## Actor\n### `Actor#name`\n`String`\n\n### `Actor#email`\n`String`\n\n### `Actor#hash`\n`String` - The MD5 hash of the actor's email. Useful for displaying\n[Gravatar](http://en.gravatar.com/) avatars.\n\n\n## Tree\n### `Tree#id`\n`String` - SHA1\n\n### `Tree#contents(callback)`\n\n  * `callback` - Receives `(err, children)`.\n  * `children` - An array of `Blob`s, `Tree`s, and `Submodule`s.\n\n### `Tree#blobs(callback)`\n\n  * `callback` - Receives `(err, child_blobs)`.\n  * `children` - `[Blob]`\n\n### `Tree#trees(callback)`\n\n  * `callback` - Receives `(err, child_trees)`.\n  * `children` - `[Tree]`\n\n### `Tree#find(directory, callback)`\n\n  * `directory` - `String`\n  * `callback`  - Receives `(err, thing)`.\n\n## Blob\n### `Blob#id`\n`String` - SHA1\n\n### `Blob#mode`\n`String`\n\n### `Blob#data(callback)`\n\n  * `callback` - `(err, data)`\n\n## Submodule\n### `Submodule#id`\n`String`\n\n### `Submodule#name`\n`String`\n\n### `Submodule#mode`\n`String`\n\n### `Submodule#url(callback)`\nGet the url the submodule points to.\n\n\n# License\nSee LICENSE.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmahon%2Fgift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielmahon%2Fgift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmahon%2Fgift/lists"}