{"id":19797816,"url":"https://github.com/nodegit/test2","last_synced_at":"2025-10-29T02:35:33.902Z","repository":{"id":25777269,"uuid":"29215629","full_name":"nodegit/test2","owner":"nodegit","description":"This is another test repo for nodegit CI tests ","archived":false,"fork":false,"pushed_at":"2015-02-18T14:53:12.000Z","size":13108,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-28T16:35:36.627Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodegit.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"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":"2015-01-13T22:53:41.000Z","updated_at":"2015-02-18T14:53:12.000Z","dependencies_parsed_at":"2022-08-30T10:50:57.527Z","dependency_job_id":null,"html_url":"https://github.com/nodegit/test2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nodegit/test2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodegit%2Ftest2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodegit%2Ftest2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodegit%2Ftest2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodegit%2Ftest2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodegit","download_url":"https://codeload.github.com/nodegit/test2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodegit%2Ftest2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262520705,"owners_count":23323756,"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-11-12T07:26:57.701Z","updated_at":"2025-10-29T02:35:33.565Z","avatar_url":"https://github.com/nodegit.png","language":"JavaScript","readme":"NodeGit\n-------\n\n\u003e Node bindings to the [libgit2](http://libgit2.github.com/) project.\n\n[![Build\nStatus](https://travis-ci.org/nodegit/nodegit.png)](https://travis-ci.org/nodegit/nodegit)\n\u003ca href=\"https://ci.appveyor.com/project/TimBranyen/nodegit\"\u003e\u003cimg src=\"https://ci.appveyor.com/api/projects/status/e5a5q75l9yfhnfv2/branch/master\" alt=\"Build Status: Windows\" height=\"18\" /\u003e\u003c/a\u003e\n\n**Stable: 0.2.0**\n\nMaintained by Tim Branyen [@tbranyen](http://twitter.com/tbranyen), Michael Robinson [@codeofinterest](http://twitter.com/codeofinterest), John Haley [@johnhaley81](http://twitter.com/johnhaley81), Max Korp [@maxkorp](http://twitter.com/MaximilianoKorp), and Nick Kallen [@nk](http://twitter.com/nk) with help from [awesome contributors](https://github.com/nodegit/nodegit/contributors)!\n\n## API Documentation. ##\n\nhttp://www.nodegit.org/\n\n## Getting started. ##\n\nNodeGit will work on most systems out-of-the-box without any native\ndependencies.\n\n``` bash\nnpm install nodegit\n```\n\nIf you encounter problems while installing, you should try the Building from source instructions below.\n\n## Building from source. ##\n\nMinimum dependencies:\n\n- [Python 2](https://www.python.org/)\n\nIf you wish to help contribute to nodegit it is useful to build locally.\n\n``` bash\n# Fetch this project.\ngit clone git://github.com/nodegit/nodegit.git\n\n# Enter the repository.\ncd nodegit\n\n# Installs the template engine, run the code generation script, and build.\nnpm install\n```\n\nIf you encounter errors, you most likely have not configured the dependencies correctly.\n\n### Installing dependencies: ###\n\n#### Mac OS X ####\n\n- [Install XCode Command Line Tools](http://railsapps.github.io/xcode-command-line-tools.html)\n\n#### Linux ####\n\nUsing APT in Ubuntu:\n\n``` bash\nsudo apt-get install build-essential\n```\n\nUsing Pacman in Arch Linux:\n\n``` bash\nsudo pacman -S base-devel\n```\n\n#### Windows ####\n\n- [Download and install Python](https://www.python.org/download/windows).\n- [Download and install VS Express](http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop).\n\nYou may have to add a build flag to the installation process to successfully install.  Try first without, if the build fails, try again with the flag.\n\n*Allegedly the order in which you install Visual Studio could trigger this error.*\n\n``` bash\nnpm install nodegit --msvs_version=2013\n# Or whatever version you've installed.\n```\n\n## API examples. ##\n\n### Cloning a repository and reading a file: ###\n\n``` javascript\nvar clone = require(\"./\").Clone.clone;\n\n// Clone a given repository into a specific folder.\nclone(\"https://github.com/nodegit/nodegit\", \"tmp\", null)\n  // Look up this known commit.\n  .then(function(repo) {\n    // Use a known commit sha from this repository.\n    return repo.getCommit(\"59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5\");\n  })\n  // Look up a specific file within that commit.\n  .then(function(commit) {\n    return commit.getEntry(\"README.md\");\n  })\n  // Get the blob contents from the file.\n  .then(function(entry) {\n    // Patch the blob to contain a reference to the entry.\n    return entry.getBlob().then(function(blob) {\n      blob.entry = entry;\n      return blob;\n    });\n  })\n  // Display information about the blob.\n  .then(function(blob) {\n    // Show the name, sha, and filesize in byes.\n    console.log(blob.entry.name() + blob.entry.sha() + blob.size() + \"b\");\n\n    // Show a spacer.\n    console.log(Array(72).join(\"=\") + \"\\n\\n\");\n\n    // Show the entire file.\n    console.log(String(blob));\n  })\n  .catch(function(err) { console.log(err); });\n\n```\n\n### Emulating git log: ###\n\n``` javascript\nvar open = require(\"nodegit\").Repository.open;\n\n// Open the repository directory.\nopen(\"tmp\")\n  // Open the master branch.\n  .then(function(repo) {\n    return repo.getMasterCommit();\n  })\n  // Display information about commits on master.\n  .then(function(firstCommitOnMaster) {\n    // Create a new history event emitter.\n    var history = firstCommitOnMaster.history();\n\n    // Create a counter to only show up to 9 entries.\n    var count = 0;\n\n    // Listen for commit events from the history.\n    history.on(\"commit\", function(commit) {\n      // Disregard commits past 9.\n      if (++count \u003e= 9) {\n        return;\n      }\n\n      // Show the commit sha.\n      console.log(\"commit \" + commit.sha());\n\n      // Store the author object.\n      var author = commit.author();\n\n      // Display author information.\n      console.log(\"Author:\\t\" + author.name() + \" \u003c\", author.email() + \"\u003e\");\n\n      // Show the commit date.\n      console.log(\"Date:\\t\" + commit.date());\n\n      // Give some space and show the message.\n      console.log(\"\\n    \" + commit.message());\n    });\n\n    // Start emitting events.\n    history.start();\n  });\n```\n\n## Unit tests. ##\n\nYou will need to build locally before running the tests.  See above.\n\n``` bash\nnpm test\n```\n\n## Migrating from old versions. ##\n\nThe bump from 0.1.4 to 0.2.0 was a big one. Many things changed, see here:\nhttps://github.com/nodegit/nodegit/compare/refs/tags/0.1.4...0.2.0\n\nThis update is wholly and entirely a breaking one, and older versions won't be\nmaintained. For the purpose of migration, perhaps the biggest point to make\nis that async methods can now use promises, rather than just taking callbacks. Additionally, lots of method and property names have changed.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodegit%2Ftest2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodegit%2Ftest2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodegit%2Ftest2/lists"}