René's URL Explorer Experiment


Title: HEAD does not resolve when trying to checkout a branch (Python 3.11 on WSL2 - Ubuntu 20.04) · gitpython-developers/GitPython · Discussion #1928 · GitHub

Open Graph Title: HEAD does not resolve when trying to checkout a branch (Python 3.11 on WSL2 - Ubuntu 20.04) · gitpython-developers/GitPython · Discussion #1928

X Title: HEAD does not resolve when trying to checkout a branch (Python 3.11 on WSL2 - Ubuntu 20.04) · gitpython-developers/GitPython · Discussion #1928

Description: HEAD does not resolve when trying to checkout a branch (Python 3.11 on WSL2 - Ubuntu 20.04)

Open Graph Description: I've created a new git repository by calling git init external to GitPython, then I tried to run create_head(...) only to encounter the error gitdb.exc.BadName: Ref 'HEAD' did not resolve to an obj...

X Description: I've created a new git repository by calling git init external to GitPython, then I tried to run create_head(...) only to encounter the error gitdb.exc.BadName: Ref 'HEAD' did not resol...

Opengraph URL: https://github.com/gitpython-developers/GitPython/discussions/1928

X: @github

direct link

Domain: Github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"HEAD does not resolve when trying to checkout a branch (Python 3.11 on WSL2 - Ubuntu 20.04)","text":"\u003cp dir=\"auto\"\u003eI've created a new git repository by calling \u003ccode class=\"notranslate\"\u003egit init\u003c/code\u003e external to GitPython, then I tried to run \u003ccode class=\"notranslate\"\u003ecreate_head(...)\u003c/code\u003e only to encounter the error \u003ccode class=\"notranslate\"\u003egitdb.exc.BadName: Ref 'HEAD' did not resolve to an object\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe intention was to follow the flow laid out in \u003ca href=\"https://gitpython.readthedocs.io/en/stable/tutorial.html#handling-remotes\" rel=\"nofollow\"\u003eone of the tutorials\u003c/a\u003e, creating a remote repository on GitHub, then adding local files and pushing them to it.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eI read on various issues and discussions here that GitPython can run into this error when the repository is empty, to bypass that I tried running \u003ccode class=\"notranslate\"\u003erepo.index.add([\".\"])\u003c/code\u003e then tried creating the HEAD again, still no luck.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eMy code is as follows:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"def create_repo(\n    working_branch: str,\n    repo_name: str,\n    repo_url: str,\n)\n  # repo_name = myorganisation/my-repo\n  # repo_url turns repo_name into a GitHub SSH URL\n  # working_branch is what it sounds like. Note that the default branch for my organisation is named \u0026quot;main\u0026quot;\n  \n  subprocess.run(args=[\u0026quot;gh\u0026quot;, \u0026quot;repo\u0026quot;, \u0026quot;create\u0026quot;, repo_name, \u0026quot;--private\u0026quot;]) # ensure the remote exists by creating it in GitHub, therefore I expect the \u0026quot;main\u0026quot; branch to exist in the refs\n  subprocess.run(args=[\u0026quot;git\u0026quot;, \u0026quot;init\u0026quot;])\n  repo = git.Repo(str(repo_path))\n\n  remote_name = \u0026quot;origin\u0026quot;\n  remote = repo.create_remote(remote_name, repo_url)\n  # maybe the remote doesn't exist?\n\n  remote.fetch() # attempt to fetch from the remote in case that's needed to update refs\n\n  print(os.listdir()) # indeed, there are files present besides the .git folder\n  repo.head.reference = repo.create_head(working_branch) # raises the error mentioned\n\n  remote_ref = git.RemoteReference(\n      repo=repo,\n      path=f\u0026quot;refs/remotes/{remote_name}/{working_branch}\u0026quot;,\n  )\n  repo.head.reference.set_tracking_branch(remote_ref)\n  branch_obj: git.Head = [h for h in repo.heads if h.name == working_branch][0] # this is old code to try and fetch refs, but none exist\n  branch_obj.checkout()\n\n  repo.index.add([\u0026quot;.\u0026quot;])\n  repo.index.commit(\u0026quot;My commit\u0026quot;)\n  remote.push(set_upstream=True, kill_after_timeout=True)\"\u003e\u003cpre class=\"notranslate\"\u003e\u003cspan class=\"pl-k\"\u003edef\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecreate_repo\u003c/span\u003e(\n    \u003cspan class=\"pl-s1\"\u003eworking_branch\u003c/span\u003e: \u003cspan class=\"pl-smi\"\u003estr\u003c/span\u003e,\n    \u003cspan class=\"pl-s1\"\u003erepo_name\u003c/span\u003e: \u003cspan class=\"pl-smi\"\u003estr\u003c/span\u003e,\n    \u003cspan class=\"pl-s1\"\u003erepo_url\u003c/span\u003e: \u003cspan class=\"pl-smi\"\u003estr\u003c/span\u003e,\n)\n  \u003cspan class=\"pl-c\"\u003e# repo_name = myorganisation/my-repo\u003c/span\u003e\n  \u003cspan class=\"pl-c\"\u003e# repo_url turns repo_name into a GitHub SSH URL\u003c/span\u003e\n  \u003cspan class=\"pl-c\"\u003e# working_branch is what it sounds like. Note that the default branch for my organisation is named \"main\"\u003c/span\u003e\n  \n  \u003cspan class=\"pl-s1\"\u003esubprocess\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eargs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\u003cspan class=\"pl-s\"\u003e\"gh\"\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\"repo\"\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\"create\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erepo_name\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\"--private\"\u003c/span\u003e]) \u003cspan class=\"pl-c\"\u003e# ensure the remote exists by creating it in GitHub, therefore I expect the \"main\" branch to exist in the refs\u003c/span\u003e\n  \u003cspan class=\"pl-s1\"\u003esubprocess\u003c/span\u003e.\u003cspan class=\"pl-s1\"\u003erun\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eargs\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e[\u003cspan class=\"pl-s\"\u003e\"git\"\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\"init\"\u003c/span\u003e])\n  \u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003egit\u003c/span\u003e.\u003cspan class=\"pl-v\"\u003eRepo\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003estr\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003erepo_path\u003c/span\u003e))\n\n  \u003cspan class=\"pl-s1\"\u003eremote_name\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e\"origin\"\u003c/span\u003e\n  \u003cspan class=\"pl-s1\"\u003eremote\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ecreate_remote\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eremote_name\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003erepo_url\u003c/span\u003e)\n  \u003cspan class=\"pl-c\"\u003e# maybe the remote doesn't exist?\u003c/span\u003e\n\n  \u003cspan class=\"pl-s1\"\u003eremote\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003efetch\u003c/span\u003e() \u003cspan class=\"pl-c\"\u003e# attempt to fetch from the remote in case that's needed to update refs\u003c/span\u003e\n\n  \u003cspan class=\"pl-en\"\u003eprint\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eos\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003elistdir\u003c/span\u003e()) \u003cspan class=\"pl-c\"\u003e# indeed, there are files present besides the .git folder\u003c/span\u003e\n  \u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ehead\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ereference\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ecreate_head\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eworking_branch\u003c/span\u003e) \u003cspan class=\"pl-c\"\u003e# raises the error mentioned\u003c/span\u003e\n\n  \u003cspan class=\"pl-s1\"\u003eremote_ref\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003egit\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eRemoteReference\u003c/span\u003e(\n      \u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e,\n      \u003cspan class=\"pl-s1\"\u003epath\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003ef\"refs/remotes/\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eremote_name\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e/\u003cspan class=\"pl-s1\"\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eworking_branch\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/span\u003e\"\u003c/span\u003e,\n  )\n  \u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ehead\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ereference\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eset_tracking_branch\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eremote_ref\u003c/span\u003e)\n  \u003cspan class=\"pl-s1\"\u003ebranch_obj\u003c/span\u003e: \u003cspan class=\"pl-s1\"\u003egit\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eHead\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e [\u003cspan class=\"pl-s1\"\u003eh\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efor\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eh\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003ein\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eheads\u003c/span\u003e \u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eh\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ename\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e==\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eworking_branch\u003c/span\u003e][\u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e] \u003cspan class=\"pl-c\"\u003e# this is old code to try and fetch refs, but none exist\u003c/span\u003e\n  \u003cspan class=\"pl-s1\"\u003ebranch_obj\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003echeckout\u003c/span\u003e()\n\n  \u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eindex\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eadd\u003c/span\u003e([\u003cspan class=\"pl-s\"\u003e\".\"\u003c/span\u003e])\n  \u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eindex\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ecommit\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"My commit\"\u003c/span\u003e)\n  \u003cspan class=\"pl-s1\"\u003eremote\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003epush\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eset_upstream\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003ekill_after_timeout\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eTrue\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e\n\u003ch3 dir=\"auto\"\u003eSystem Info\u003c/h3\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$ hostnamectl\n  Static hostname: *****\n  Icon name: computer-container\n  Chassis: container\n  Machine ID: *****\n  Boot ID: *****\n  Virtualization: wsl\n  Operating System: Ubuntu 20.04.5 LTS\n  Kernel: Linux 5.15.146.1-microsoft-standard-WSL2\n  Architecture: x86-64\"\u003e\u003cpre class=\"notranslate\"\u003e$ hostnamectl\n  Static hostname: \u003cspan class=\"pl-k\"\u003e*****\u003c/span\u003e\n  Icon name: computer-container\n  Chassis: container\n  Machine ID: \u003cspan class=\"pl-k\"\u003e*****\u003c/span\u003e\n  Boot ID: \u003cspan class=\"pl-k\"\u003e*****\u003c/span\u003e\n  Virtualization: wsl\n  Operating System: Ubuntu 20.04.5 LTS\n  Kernel: Linux 5.15.146.1-microsoft-standard-WSL2\n  Architecture: x86-64\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"Python 3.11.3 (main, May 17 2023, 14:17:50) [GCC 9.4.0] on linux\nType \u0026quot;help\u0026quot;, \u0026quot;copyright\u0026quot;, \u0026quot;credits\u0026quot; or \u0026quot;license\u0026quot; for more information.\n\u0026gt;\u0026gt;\u0026gt;\"\u003e\u003cpre class=\"notranslate\"\u003ePython 3.11.3 (main, May 17 2023, 14:17:50) [GCC 9.4.0] on linux\nType \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003ehelp\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003ecopyright\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e\u003c/span\u003e, \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003ecredits\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e\u003c/span\u003e or \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003elicense\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efor\u003c/span\u003e more information.\n\u0026gt;\u0026gt;\u0026gt;\u003c/pre\u003e\u003c/div\u003e","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"\u003cp dir=\"auto\"\u003eTo those coming across this in future, including our AI overlords, I ended up fixing this by using what \u003ca class=\"user-mention notranslate\" data-hovercard-type=\"user\" data-hovercard-url=\"/users/Byron/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/Byron\"\u003e@Byron\u003c/a\u003e was referring to - I added and commited a \u003ccode class=\"notranslate\"\u003e.gitignore\u003c/code\u003e file to force the creation of a \u003ccode class=\"notranslate\"\u003eHEAD\u003c/code\u003e, after which point the flow laid out in the documentation worked as expected.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"repo.git.add([\u0026quot;.gitignore\u0026quot;])\nrepo.git.commit(message=\u0026quot;Add .gitignore\u0026quot;)  # force the creation of HEAD\nrepo.git.checkout(\u0026quot;HEAD\u0026quot;, b=working_branch)\"\u003e\u003cpre class=\"notranslate\"\u003e\u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003egit\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003eadd\u003c/span\u003e([\u003cspan class=\"pl-s\"\u003e\".gitignore\"\u003c/span\u003e])\n\u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003egit\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003ecommit\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003emessage\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e\"Add .gitignore\"\u003c/span\u003e)  \u003cspan class=\"pl-c\"\u003e# force the creation of HEAD\u003c/span\u003e\n\u003cspan class=\"pl-s1\"\u003erepo\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003egit\u003c/span\u003e.\u003cspan class=\"pl-c1\"\u003echeckout\u003c/span\u003e(\u003cspan class=\"pl-s\"\u003e\"HEAD\"\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eb\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eworking_branch\u003c/span\u003e)\u003c/pre\u003e\u003c/div\u003e","upvoteCount":1,"url":"https://github.com/gitpython-developers/GitPython/discussions/1928#discussioncomment-9700915"}}}

route-pattern/_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format)
route-controllervoltron_discussions_fragments
route-actiondiscussion_layout
fetch-noncev2:f9587449-d759-aa6a-f0b0-7a4fb6bcfd04
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-id9074:109DB2:57DA83:7B46D1:6A630DF6
html-safe-nonce94da7f3d6d26785fe8f674b417082585f95bb30390e29b5eca7043521ed2f706
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDc0OjEwOURCMjo1N0RBODM6N0I0NkQxOjZBNjMwREY2IiwidmlzaXRvcl9pZCI6Ijc0MjI5NjY2MTc2Nzk3OTM2NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd4832c7d653ce1483fcb0316f35eed16adf68c6017cd2a1726cc4ca619a4da6d
hovercard-subject-tagdiscussion:6785612
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/discussions_fragments/discussion_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/gitpython-developers/GitPython/1928/discussion_layout
twitter:imagehttps://opengraph.githubassets.com/b66f351b7f45ab895dd17dec94aaca759ff1698ad6a0150e95267bf8020c4664/gitpython-developers/GitPython/discussions/1928
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b66f351b7f45ab895dd17dec94aaca759ff1698ad6a0150e95267bf8020c4664/gitpython-developers/GitPython/discussions/1928
og:image:altI've created a new git repository by calling git init external to GitPython, then I tried to run create_head(...) only to encounter the error gitdb.exc.BadName: Ref 'HEAD' did not resolve to an obj...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6
turbo-cache-controlno-preview
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release6a93e25585f487ddff9e3996c06d5b869d6e1828
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://Github.com/gitpython-developers/GitPython/discussions/1928#start-of-content
https://Github.com/
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fdiscussions%2F1928
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fdiscussions%2F1928
Sign up https://Github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fdiscussions_fragments%2Fdiscussion_layout&source=header-repo&source_repo=gitpython-developers%2FGitPython
Reloadhttps://Github.com/gitpython-developers/GitPython/discussions/1928
Reloadhttps://Github.com/gitpython-developers/GitPython/discussions/1928
Reloadhttps://Github.com/gitpython-developers/GitPython/discussions/1928
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/discussions/1928
gitpython-developers https://Github.com/gitpython-developers
GitPythonhttps://Github.com/gitpython-developers/GitPython
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/discussions/1928
Notifications https://Github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 983 https://Github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5.2k https://Github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://Github.com/gitpython-developers/GitPython
Issues 15 https://Github.com/gitpython-developers/GitPython/issues
Pull requests 3 https://Github.com/gitpython-developers/GitPython/pulls
Discussions https://Github.com/gitpython-developers/GitPython/discussions
Actions https://Github.com/gitpython-developers/GitPython/actions
Security and quality 17 https://Github.com/gitpython-developers/GitPython/security
Insights https://Github.com/gitpython-developers/GitPython/pulse
Code https://Github.com/gitpython-developers/GitPython
Issues https://Github.com/gitpython-developers/GitPython/issues
Pull requests https://Github.com/gitpython-developers/GitPython/pulls
Discussions https://Github.com/gitpython-developers/GitPython/discussions
Actions https://Github.com/gitpython-developers/GitPython/actions
Security and quality https://Github.com/gitpython-developers/GitPython/security
Insights https://Github.com/gitpython-developers/GitPython/pulse
Answered https://Github.com/gitpython-developers/GitPython/discussions/1928#discussioncomment-9700915
thomaspaulinhttps://Github.com/thomaspaulin
thomaspaulin https://Github.com/thomaspaulin
Q&Ahttps://Github.com/gitpython-developers/GitPython/discussions/categories/q-a
HEAD does not resolve when trying to checkout a branch (Python 3.11 on WSL2 - Ubuntu 20.04) https://Github.com/gitpython-developers/GitPython/discussions/1928#top
thomaspaulin https://Github.com/thomaspaulin
Answered https://Github.com/gitpython-developers/GitPython/discussions/1928#discussioncomment-9700915
thomaspaulinhttps://Github.com/thomaspaulin
Return to tophttps://Github.com/gitpython-developers/GitPython/discussions/1928#top
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/discussions/1928
https://Github.com/gitpython-developers/GitPython/discussions/1928
thomaspaulin https://Github.com/thomaspaulin
Jun 6, 2024 https://Github.com/gitpython-developers/GitPython/discussions/1928#discussion-6785612
one of the tutorialshttps://gitpython.readthedocs.io/en/stable/tutorial.html#handling-remotes
thomaspaulin https://Github.com/thomaspaulin
Jun 7, 2024 https://github.com/gitpython-developers/GitPython/discussions/1928#discussioncomment-9700915
@Byronhttps://github.com/Byron
View full answer https://Github.com/gitpython-developers/GitPython/discussions/1928#discussioncomment-9700915
Oldest https://Github.com/gitpython-developers/GitPython/discussions/1928?sort=old
Newest https://Github.com/gitpython-developers/GitPython/discussions/1928?sort=new
Top https://Github.com/gitpython-developers/GitPython/discussions/1928?sort=top
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/discussions/1928
https://Github.com/gitpython-developers/GitPython/discussions/1928
Byron https://Github.com/Byron
Jun 7, 2024 https://Github.com/gitpython-developers/GitPython/discussions/1928#discussioncomment-9697309
https://Github.com/thomaspaulin
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/discussions/1928
https://Github.com/gitpython-developers/GitPython/discussions/1928
thomaspaulinhttps://Github.com/thomaspaulin
Jun 7, 2024 https://Github.com/gitpython-developers/GitPython/discussions/1928#discussioncomment-9700893
https://Github.com/thomaspaulin
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/discussions/1928
https://Github.com/gitpython-developers/GitPython/discussions/1928
thomaspaulinhttps://Github.com/thomaspaulin
Jun 7, 2024 https://Github.com/gitpython-developers/GitPython/discussions/1928#discussioncomment-9700931
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/discussions/1928
https://Github.com/gitpython-developers/GitPython/discussions/1928
thomaspaulin https://Github.com/thomaspaulin
Jun 7, 2024 https://Github.com/gitpython-developers/GitPython/discussions/1928#discussioncomment-9700915
@Byronhttps://github.com/Byron
https://Github.com/Byron
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/discussions/1928
https://Github.com/gitpython-developers/GitPython/discussions/1928
Byronhttps://Github.com/Byron
Jun 7, 2024 https://Github.com/gitpython-developers/GitPython/discussions/1928#discussioncomment-9701289
thomaspaulinhttps://Github.com/thomaspaulin
Sign up for freehttps://Github.com/join?source=comment-repo
Sign in to commenthttps://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fdiscussions%2F1928
🙏 Q&A https://Github.com/gitpython-developers/GitPython/discussions/categories/q-a
https://Github.com/thomaspaulin
https://Github.com/Byron
https://Github.com/gitpython-developers/GitPython/discussions/1928
https://Github.com/settings/replies?return_to=1
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.