mirror of
https://github.com/grdl/git-get.git
synced 2026-02-04 15:04:44 +00:00
Add --skip-host flag to get command (#7)
When set, git-get won't create a directory for the repo host. So instead of `<root>/<host>/<user>/<repo>`, a repo will be cloned into `<root>/<user>/<repo>`. It's useful if all repos some from the same host and that additional folder feels redundant.
This commit is contained in:
committed by
GitHub
parent
0097681f89
commit
0064fc3b8e
@@ -67,6 +67,7 @@ Flags:
|
||||
-h, --help Print this help and exit.
|
||||
-t, --host Host to use when <REPO> doesn't have a specified host. (default "github.com")
|
||||
-r, --root Path to repos root where repositories are cloned. (default "~/repositories")
|
||||
-s, --skip-host Don't create a directory for host.
|
||||
-v, --version Print version and exit.
|
||||
```
|
||||
|
||||
@@ -143,11 +144,14 @@ export GITGET_ROOT=/path/to/my/repos
|
||||
|
||||
You can define a `[gitget]` section inside your global `.gitconfig` file and set the configuration flags there. A recommended pattern is to set `root` and `host` variables there if you don't want to use the defaults.
|
||||
|
||||
If all of your repos come from the same host and you find creating directory for it redundant, you can use the `skip-host` flag to skip creating it.
|
||||
|
||||
Here's an example of a working snippet from `.gitconfig` file:
|
||||
```
|
||||
[gitget]
|
||||
root = /path/to/my/repos
|
||||
host = gitlab.com
|
||||
skip-host = true
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user