-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Describe the feature or problem you’d like to solve
I'm really happy to use gh for my projects and it's really helping me with increasing GitHub processes speed. But when I use gh repo create, it initializes the created repository in the current directory and I cannot customize the target base folder. If I'm in another directory than the actual folder I would like to create the project in, then I have to switch the directory and then use gh.
▶ gh repo create organization/foo --confirm --private
✓ Created repository organization/foo on GitHub
Initialized empty Git repository in ./foo/.git/
✓ Initialized repository in './foo/'
In this case, I would like to init the repo in another folder, not in the current one.
Proposed solution
To be able to achieve this issue, we can add a new flag for gh repo create and let the user specify the base init dir for the newly created repo. So they can initialize the repo in whatever directory they want.
▶ gh repo create organization/foo --confirm --private --init-base-dir=/dev/repo/target
✓ Created repository organization/foo on GitHub
Initialized empty Git repository in /dev/repo/target/foo/.git/
✓ Initialized repository in '/dev/repo/target/foo/'
Additional context
I can happily send a pull request for this feature if you would agree with the feature.