-
Notifications
You must be signed in to change notification settings - Fork 7k
Description
Describe the feature or problem you’d like to solve
When I use gh repo create
and specify "Push an existing local repository to Github"
on my bare repository, it says "current directory is not a git repository. Run git init to initialize it"
. To resolve this, I go to the web interface and manually create a new repo. I'd like to request for gh repo create
to recognize bare repositories as repositories.
Proposed solution
#6880 was a merged PR that migrated to git rev-parse's --git-dir
flag to correctly recognize bare and non-bare repos for another part of the github cli for a similar issue. Although this is what the gh repo create
command also does, it only checks if the result is .git
, instead of also checking if it's also .
in the case of a bare repo. We can check for a .
case.
Additional context
This will make the CLI's functionality more streamlined and consistent with user expectations