Update readme and examples

This commit is contained in:
Jay Gabriels
2021-08-05 22:08:26 -07:00
parent 39a285bcb9
commit 4b402f2e44
3 changed files with 7 additions and 5 deletions

View File

@@ -113,9 +113,11 @@ $ security find-internet-password -s gitlab.com | grep "acct" | awk -F\" '{ pri
> It's recommended to store github/gitlab tokens in the osxkeychain, if this command returns anything other than your token see Troubleshooting section below. However, you can always add your token to the $HOME/.config/ghorg/conf.yaml or use the (--token, -t) flags.
## Ignoring Repos
- To ignore any archived repos while cloning use the `--skip-archived` flag (not bitbucket)
- To ignore specific repos create a `ghorgignore` file inside `$HOME/.config/ghorg`. Each line in this file is considered a substring and will be compared against each repos clone url. If the clone url contains a substring in the `ghorgignore` it will be excluded from cloning. To prevent accidentally excluding a repo, you should make each line as specific as possible, eg. `https://github.com/gabrie30/ghorg.git` or `git@github.com:gabrie30/ghorg.git` depending on how you clone.
## Filtering Repos
- To filter repos by regex use `--match-regex` flag
- To filter out any archived repos while cloning use the `--skip-archived` flag (not bitbucket)
- To ignore specific repos create a `ghorgignore` file inside `$HOME/.config/ghorg`. Each line in this file is considered a substring and will be compared against each repos clone url. If the clone url contains a substring in the `ghorgignore` it will be excluded from cloning. To prevent accidentally excluding a repo, you should make each line as specific as possible, eg. `https://github.com/gabrie30/ghorg.git` or `git@github.com:gabrie30/ghorg.git` depending on how you clone. This is useful for permanently igorning certain repos.
```bash
# Create ghorgignore

View File

@@ -13,5 +13,5 @@ $ ghorg clone <github_org>
clone all repos from a **github org** that are **prefixed** with "frontend" **into a folder** called "design_only"
```
$ ghorg clone <github_org> --match-prefix=frontend --output-dir=design_only
$ ghorg clone <github_org> --match-regex=^frontend --output-dir=design_only
```

View File

@@ -21,5 +21,5 @@ $ ghorg clone <gitlab_group>/<gitlab_sub_group> --base-url=https://<your.instanc
clone all repos that are **prefixed** with "frontend" **into a folder** called "design_only" from a **group** on a **hosted gitlab** instance
```
$ ghorg clone <gitlab_group> --base-url=https://<your.instance.gitlab.com> --scm=gitlab --match-prefix=frontend --output-dir=design_only
$ ghorg clone <gitlab_group> --base-url=https://<your.instance.gitlab.com> --scm=gitlab --match-regex=^frontend --output-dir=design_only
```