Files
ghorg/examples/gitea.md
2024-09-21 20:06:27 -07:00

30 lines
1.2 KiB
Markdown

# Gitea Examples
> Note: all command line arguments can be permanently set in your `$HOME/.config/ghorg/conf.yaml` for more information see the [configuration](https://github.com/gabrie30/ghorg#configuration) section of the README.md.
To view all additional flags see the [sample-conf.yaml](https://github.com/gabrie30/ghorg/blob/master/sample-conf.yaml) or use `ghorg clone --help`
## Things to know
1. The `--preserve-scm-hostname` flag will always create a top level folder in your GHORG_ABSOLUTE_PATH_TO_CLONE_TO with the hostname of the `GHORG_SCM_BASE_URL` you are cloning from.
## Examples
1. Clone an **org**
```
ghorg clone <gitea_org> --base-url=https://<your-internal-gitea>.com --token=XXXXXXX
```
1. Clone a **users** repos
```
ghorg clone <gitea_username> --clone-type=user --base-url=https://<your-internal-gitea>.com --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
```
1. Clone all repos from a **gitea org** that are **prefixed** with "frontend" **into a folder** called "design_only"
```
ghorg clone <gitea_org> --match-regex=^frontend --output-dir=design_only --base-url=https://<your-internal-gitea>.com --token=XXXXXXX
```