Title: Error: Reference 'refs/remotes/user/foo/HEAD' not found · Issue #523 · nodegit/nodegit · GitHub
Open Graph Title: Error: Reference 'refs/remotes/user/foo/HEAD' not found · Issue #523 · nodegit/nodegit
X Title: Error: Reference 'refs/remotes/user/foo/HEAD' not found · Issue #523 · nodegit/nodegit
Description: Folks, I have a branch called user/foo that I'd like to check out from remote. Code: Git.prototype.refresh = function refresh(branch) { var repository; var options = { credentials: function() { return NodeGit.Cred.userpassPlaintextNew(GI...
Open Graph Description: Folks, I have a branch called user/foo that I'd like to check out from remote. Code: Git.prototype.refresh = function refresh(branch) { var repository; var options = { credentials: function() { ret...
X Description: Folks, I have a branch called user/foo that I'd like to check out from remote. Code: Git.prototype.refresh = function refresh(branch) { var repository; var options = { credentials: function() {...
Opengraph URL: https://github.com/nodegit/nodegit/issues/523
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error: Reference 'refs/remotes/user/foo/HEAD' not found","articleBody":"Folks, I have a branch called `user/foo` that I'd like to check out from remote. Code:\n\n```\nGit.prototype.refresh = function refresh(branch) {\n var repository;\n\n var options = {\n credentials: function() {\n return NodeGit.Cred.userpassPlaintextNew(GITHUB_TOKEN, \"x-oauth-basic\");\n },\n certificateCheck: function() {\n return 1;\n }\n };\n\n return NodeGit.Repository.open(localPath).then(function (repo) {\n repository = repo;\n\n return repository.checkoutBranch(branch, options).then(function (checkoutresult) {\n\n return repository.fetchAll(options).then(function (result) {\n return Promise.resolve(result);\n }).catch(function (err) {\n console.log('Unable to fetch',err);\n return Promise.reject(new Error(err));\n });\n }).catch(function(err) {\n console.log('checkoutBranch',err);\n return Promise.reject(new Error(err));\n });\n });\n};\n\n```\n\nerror:\n\n```\n[Error: Error: Reference 'refs/remotes/user/foo/HEAD' not found]\n```\n\nAm I using checkoutBranch incorrectly? I already have the remote cloned to a local directory, and am trying to switch to a particular branch.\n\nThanks!\n","author":{"url":"https://github.com/vasiliyb","@type":"Person","name":"vasiliyb"},"datePublished":"2015-04-01T14:19:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/523/nodegit/issues/523"}
| 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:63f98643-3049-dfd2-de2f-5aac04ac6fcc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB30:197DBD:4907801:60EC769:6A5D8E3A |
| html-safe-nonce | ddd3478613701f082a4cd8f000cf384cb48ccce3f0d3f3dc87ede09d252c2c12 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjMwOjE5N0RCRDo0OTA3ODAxOjYwRUM3Njk6NkE1RDhFM0EiLCJ2aXNpdG9yX2lkIjoiNjEwNzkyNzcxMTMwOTQ2NzE5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2388cc31e2c39f2685b6c7f94433852bb17d4f6a094530afc0c63d0d5bd6dd39 |
| hovercard-subject-tag | issue:65697402 |
| 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/523/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e7d308c935fe5dd22b4f681c0eb48685827b35ce89a6d69e41cb183ee6ce8542/nodegit/nodegit/issues/523 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e7d308c935fe5dd22b4f681c0eb48685827b35ce89a6d69e41cb183ee6ce8542/nodegit/nodegit/issues/523 |
| og:image:alt | Folks, I have a branch called user/foo that I'd like to check out from remote. Code: Git.prototype.refresh = function refresh(branch) { var repository; var options = { credentials: function() { ret... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vasiliyb |
| 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