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: user:token@github.com
IPv4 address: 140.82.114.3
{"@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:2944aaa8-a09d-05b4-05a8-dfef23eba8cf |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | 8320:23514F:1184B02:174ADFE:6B065860 |
| html-safe-nonce | e20b98cedd89b246de1ecca8ec66acd39631de212cc65d27883f7f413ab7c12a |
| visitor-payload | eyJyZWZlcnJlciI6bnVsbCwicmVxdWVzdF9pZCI6IjgzMjA6MjM1MTRGOjExODRCMDI6MTc0QURGRTo2QjA2NTg2MCIsInZpc2l0b3JfaWQiOiIyOTczNjg5Mjk0Mjk4MTc1NTg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiY2VudHJhbHVzIn0= |
| visitor-hmac | 0af41d0563043121648d08ff64618d1444557ca61ebbd4f579cdcb1aa12a12d4 |
| 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 | 6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297 |
| 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 | 7f0aa75f4141d440c6110dc31af7ea7797abb6c4 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width