Skip to content

Init repository when running "gh repo create" in existing directory #1280

@egormalyutin

Description

@egormalyutin

Describe the feature or problem you’d like to solve

At this moment if I want to create a repo with gh, I need to run these commands:

git init
git add --all
git commit -m "Init"
gh repo create

I think gh would be much more useful if it could init Git repo in current directory (if no Git repo was found in upper directories).

Proposed solution

The benefit will be typing less :)

Example:

# Turn on this repo initializing feature, set "Init" as initial commit name and create a Github repo:
gh repo create -i -m Init
# Turn on repo initializing feature and create a Github repo (default initial commit name will be used):
gh repo create -i

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIneeds-designAn engineering task needs design to proceed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions