Skip to content

"gh repo create --template" creates an empty repository locally #2290

@kb-1000

Description

@kb-1000

Describe the bug

gh repo create --template only uses the template remotely. Locally, the created repository is empty.

gh version:

gh version 1.1.0 (2020-10-06)
https://github.com/cli/cli/releases/latest

Steps to reproduce the behavior

  1. Type this 'gh repo create --template FabricMC/fabric-example-mod my-mod'
  2. Select Private (may be unimportant, but this was what I did)
  3. Look at the locally created Git repository
  4. See no files from the template

Expected vs actual behavior

I would have expected gh to locally create the files too, and that the initial commit is in my history. However, both did not happen.
Both happened on the server though.

Logs

[kb1000@local-host ~]$ gh repo create --template FabricMC/fabric-example-mod my-mod
? Visibility Private
? This will create 'my-mod' in your current directory. Continue?  Yes
✓ Created repository kb-1000/my-mod on GitHub
? Create a local project directory for kb-1000/my-mod? Yes
Leeres Git-Repository in /home/kb1000/my-mod/.git/ initialisiert
✓ Initialized repository in './my-mod/'
[kb1000@local-host ~]$ cd my-mod
[kb1000@local-host my-mod]$ ls
[kb1000@local-host my-mod]$ git log
fatal: Ihr aktueller Branch 'master' hat noch keine Commits.
[kb1000@local-host my-mod]$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcoreThis issue is not accepting PRs from outside contributorspriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions