Title: `git2cpp status` does not work in a newly initialised repo · Issue #58 · QuantStack/git2cpp · GitHub
Open Graph Title: `git2cpp status` does not work in a newly initialised repo · Issue #58 · QuantStack/git2cpp
X Title: `git2cpp status` does not work in a newly initialised repo · Issue #58 · QuantStack/git2cpp
Description: In a new repo created using git2cpp init a git2cpp status command fails whereas git status works OK: $ mkdir temp $ cd temp $ ../build/git2cpp init . $ ../build/git2cpp status error: reference 'refs/heads/master' not found $ git status O...
Open Graph Description: In a new repo created using git2cpp init a git2cpp status command fails whereas git status works OK: $ mkdir temp $ cd temp $ ../build/git2cpp init . $ ../build/git2cpp status error: reference 'ref...
X Description: In a new repo created using git2cpp init a git2cpp status command fails whereas git status works OK: $ mkdir temp $ cd temp $ ../build/git2cpp init . $ ../build/git2cpp status error: reference '...
Opengraph URL: https://github.com/QuantStack/git2cpp/issues/58
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`git2cpp status` does not work in a newly initialised repo","articleBody":"In a new repo created using `git2cpp init` a `git2cpp status` command fails whereas `git status` works OK:\n```bash\n\n$ mkdir temp\n$ cd temp\n$ ../build/git2cpp init .\n$ ../build/git2cpp status\nerror: reference 'refs/heads/master' not found\n$ git status\nOn branch master\n\nNo commits yet\n\nnothing to commit (create/copy files and use \"git add\" to track)\n```\n\nI assume that the `init` is OK and it is the `status` at fault, perhaps if no branch exists it should fall back to assuming a default?","author":{"url":"https://github.com/ianthomas23","@type":"Person","name":"ianthomas23"},"datePublished":"2025-11-27T11:21:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/58/git2cpp/issues/58"}
| 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:a499f370-3f31-adda-ac04-a8cc5d298181 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B6A8:226908:3AAF8CB:5246A6E:69712DE0 |
| html-safe-nonce | 60088a0a984cb2c17f5d3e044d1c9734c40c7fc93fccce323b6d2c7debbb5ddb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkE4OjIyNjkwODozQUFGOENCOjUyNDZBNkU6Njk3MTJERTAiLCJ2aXNpdG9yX2lkIjoiNzUyMDgxMDY3OTk1MDk3ODUyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f8444860872e5a45133332215d29de5dbf853902f1da1baa91b4b502a0556b29 |
| hovercard-subject-tag | issue:3670980983 |
| 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/QuantStack/git2cpp/58/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4a6b433535faea753190fc51b78ca38709143e4071621c94e988e1c09384887d/QuantStack/git2cpp/issues/58 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4a6b433535faea753190fc51b78ca38709143e4071621c94e988e1c09384887d/QuantStack/git2cpp/issues/58 |
| og:image:alt | In a new repo created using git2cpp init a git2cpp status command fails whereas git status works OK: $ mkdir temp $ cd temp $ ../build/git2cpp init . $ ../build/git2cpp status error: reference 'ref... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ianthomas23 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 235f189cb7458700436eaa6676a45f9abab16ecdfb4be6cc339f24abaa820b19 |
| turbo-cache-control | no-preview |
| go-import | github.com/QuantStack/git2cpp git https://github.com/QuantStack/git2cpp.git |
| octolytics-dimension-user_id | 19627246 |
| octolytics-dimension-user_login | QuantStack |
| octolytics-dimension-repository_id | 988433538 |
| octolytics-dimension-repository_nwo | QuantStack/git2cpp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 988433538 |
| octolytics-dimension-repository_network_root_nwo | QuantStack/git2cpp |
| 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 | e26123de62cafb036ecaec64b7f90a01b4a7f823 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width