Title: Cannot create a new branch · Issue #391 · nodegit/nodegit · GitHub
Open Graph Title: Cannot create a new branch · Issue #391 · nodegit/nodegit
X Title: Cannot create a new branch · Issue #391 · nodegit/nodegit
Description: I am trying to create a new branch in my repo, however I am getting an error about a callback not existing. This is using version 0.2.7 from NPM Git = require('nodegit'); scope = {} Git.Repository.open("./") .then(function(repo) { scope....
Open Graph Description: I am trying to create a new branch in my repo, however I am getting an error about a callback not existing. This is using version 0.2.7 from NPM Git = require('nodegit'); scope = {} Git.Repository....
X Description: I am trying to create a new branch in my repo, however I am getting an error about a callback not existing. This is using version 0.2.7 from NPM Git = require('nodegit'); scope = {} Git.Rep...
Opengraph URL: https://github.com/nodegit/nodegit/issues/391
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot create a new branch","articleBody":"I am trying to create a new branch in my repo, however I am getting an error about a callback not existing. This is using version 0.2.7 from NPM\n\n```\nGit = require('nodegit');\n\nscope = {}\n\nGit.Repository.open(\"./\")\n .then(function(repo) {\n scope.repo = repo;\n return repo.getMasterCommit();\n })\n .then(function(masterCommit) {\n scope.masterCommit = masterCommit;\n return Git.Branch.create(scope.repo, \"new-branch\", scope.masterCommit, true)\n })\n .then(function(branch) {\n console.log(branch.toString())\n })\n .catch(function(err) {\n console.log(err.toString())\n })\n\n```\n\nThis results in the output\n\n```\nError: Callback is required and must be a Function.\n```\n","author":{"url":"https://github.com/ashokfernandez","@type":"Person","name":"ashokfernandez"},"datePublished":"2015-02-09T16:27:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/391/nodegit/issues/391"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:39308c6f-ce04-1bd7-c53b-fc7af101b889 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80FE:246CE:58190D9:72FB8C3:6A5D9FB1 |
| html-safe-nonce | 06c553c8f53785477ab84b789760b9774d36902eab778df3e7fb0daabd62f661 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEZFOjI0NkNFOjU4MTkwRDk6NzJGQjhDMzo2QTVEOUZCMSIsInZpc2l0b3JfaWQiOiI4NDQ0NjczNjU0NDYyOTgwMDE3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8583a35f35e003f72a2a9c45a882024ad21d3bf2924cc352c66273b4a9b67910 |
| hovercard-subject-tag | issue:57053467 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodegit/nodegit/391/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0453415810cbdfbe32c66068b251428df659a44023bec3c5aca1208a9b001379/nodegit/nodegit/issues/391 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0453415810cbdfbe32c66068b251428df659a44023bec3c5aca1208a9b001379/nodegit/nodegit/issues/391 |
| og:image:alt | I am trying to create a new branch in my repo, however I am getting an error about a callback not existing. This is using version 0.2.7 from NPM Git = require('nodegit'); scope = {} Git.Repository.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ashokfernandez |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width