Skip to content

Add a way for gh repo create to push the HEAD branch #3209

@driesvints

Description

@driesvints

Describe the feature or problem you’d like to solve

After creating a new GitHub repo, the repository is empty. I'd like to have the current HEAD branch pushed to the repo so the repository is already populated with code.

Proposed solution

This will allow people to get started with their new repo that much easily. Maybe one of the following three flags can be considered?

gh repo create --with-head
gh repo create --with-branch
gh repo create -b

Additional context

This is handy for when you're automating things with the CLI and want to have a repository ready to go with populated code. See the discussion in #3088 for extra context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions