Title: How to know which is the default branch · gitpython-developers/GitPython · Discussion #1364 · GitHub
Open Graph Title: How to know which is the default branch · gitpython-developers/GitPython · Discussion #1364
X Title: How to know which is the default branch · gitpython-developers/GitPython · Discussion #1364
Description: How to know which is the default branch
Open Graph Description: How one can one which is the default branch? main/master? One can know about this by iterating all heads and then manually check , but that is also have one issue. What if a repository has both the...
X Description: How one can one which is the default branch? main/master? One can know about this by iterating all heads and then manually check , but that is also have one issue. What if a repository has both the...
Opengraph URL: https://github.com/gitpython-developers/GitPython/discussions/1364
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"How to know which is the default branch","text":"\u003cp dir=\"auto\"\u003eHow one can one which is the default branch? main/master?\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eOne can know about this by iterating all heads and then manually check , but that is also have one issue.\u003cbr\u003e\nWhat if a repository has both the branches as their branch, which means master, main are some branch and default branch could be one of these or something else.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eHow to get the default branch ?\u003c/p\u003e","upvoteCount":2,"answerCount":3,"acceptedAnswer":{"@type":"Answer","text":"\u003cp dir=\"auto\"\u003ethis seems to work \u003ccode class=\"notranslate\"\u003erepo.remotes.origin.refs.HEAD.ref.remote_head\u003c/code\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ebit verbose tho!\u003c/p\u003e","upvoteCount":1,"url":"https://github.com/gitpython-developers/GitPython/discussions/1364#discussioncomment-1671183"}}}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:28522e99-ab68-8b68-d022-959886e8bc6d |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | BB2C:EA06E:1075E14:151DCEA:6B010040 |
| html-safe-nonce | eba410584b3f0e40bd028c113f150354e9f48749d647cda1fd1f2c82ac87f1a1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjJDOkVBMDZFOjEwNzVFMTQ6MTUxRENFQTo2QjAxMDA0MCIsInZpc2l0b3JfaWQiOiI0MTc3Mzk1MTcwODE3NDA5MDg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 36847105e688c3da2439db4ed42746702991003dc0db6fcfc124599e030ab3b5 |
| hovercard-subject-tag | discussion:3639938 |
| github-keyboard-shortcuts | repository,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/Voltron::DiscussionsFragmentsController/show/gitpython-developers/GitPython/1364/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/b8ea699f7a80791f49f4bead8e544cd64f0d19d6deca2608c232779e95992b15/gitpython-developers/GitPython/discussions/1364 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b8ea699f7a80791f49f4bead8e544cd64f0d19d6deca2608c232779e95992b15/gitpython-developers/GitPython/discussions/1364 |
| og:image:alt | How one can one which is the default branch? main/master? One can know about this by iterating all heads and then manually check , but that is also have one issue. What if a repository has both the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width