I want through the terminal to create a new codespace on Github, from the current git repository.
I can create codespace from gh
with this params
$ gh codespace create
? Repository: [? for help, tab for suggestions]
and then enter repo name with username/repo-name
format.
You can get the repo name with username/repo-name format from the git URL, and then create a codespace from them.
git config --get remote.origin.url
username/repo-name
format$ git config --get remote.origin.url | sed 's/https:\/\/github\.com\///' | sed 's/\.git$//'
$ git config --get remote.origin.url | sed 's/https:\/\/github\.com\///' | sed 's/\.git$//' | xargs gh codespace create -r