This repository has been archived by the owner on Jan 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Default branch can't always be determined #3
Labels
bug
Something isn't working
Comments
So the real problem here, is that there is no such thing as a "default branch". It is a thing on GitHub, sure, but in a plain git context, there is no default branch. There is |
This might be a way to go:
In particular, the |
jhauberg
added a commit
that referenced
this issue
Feb 27, 2019
Seems to work. Closing for now. |
dhimmel
added a commit
to dhimmel/manubot-rootstock
that referenced
this issue
Dec 10, 2020
Goal is to make CI scripts work with a default branch of main or master. notes: `git symbolic-ref refs/remotes/origin/HEAD` worked locally but not on GitHub actions. references: - actions/checkout#283 (comment) - https://github.com/thoughtbot/dotfiles/blob/2a59c1890f81bffc1db79cae4482ce2b706b0f79/bin/git-up - https://github.com/actions/checkout/pull/284/files - jhauberg/gitdoctor#3 (comment)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The function
default_branch
rely on the existence of aHEAD
ref inrefs/remotes/origin
to determine default branch name. However, this ref does not always, nor does it have to, exist (see this answer).gitdoctor/doctor/repo.py
Lines 44 to 51 in ecb0e4c
In a repository where the
refs/remotes/origin/HEAD
does not exist, this error will trigger:The text was updated successfully, but these errors were encountered: