This GitHub CLI extension is a tool for cloning GitHub repositories in a specified manner.
- When executing
gh clone-repo [repo], a directory named after the currently logged-in username is created, and the repository is cloned into it. If the directory already exists, the repository is cloned into that directory. - When executing
gh clone-repo [owner/repo], a directory named afterowneris created, and the repository is cloned into it. If the directory already exists, the repository is cloned into that directory. - When executing
gh clone-repo [repo url],owner/repois extracted from the URL, a directory named after owner is created, and the repository is cloned into it. If the directory already exists, the repository is cloned into that directory. - When specifying
-u <string>or--upstream-remote-name <string>option, it changes the remote name of the upstream to the specified name.
-
Install the
ghCLI - see the installation -
Install this extension:
gh extension install tetzng/gh-clone-repo
gh clone-repo [repo | owner/repo | repo url] [-u, --upstream-remote-name <string>]