From 4b402f2e44bc9d0e697fb37e29794b13aa576230 Mon Sep 17 00:00:00 2001 From: Jay Gabriels Date: Thu, 5 Aug 2021 22:08:26 -0700 Subject: [PATCH] Update readme and examples --- README.md | 8 +++++--- examples/github.md | 2 +- examples/gitlab.md | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 308d39a..aa0e79d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/examples/github.md b/examples/github.md index f193c23..4456485 100644 --- a/examples/github.md +++ b/examples/github.md @@ -13,5 +13,5 @@ $ ghorg clone clone all repos from a **github org** that are **prefixed** with "frontend" **into a folder** called "design_only" ``` -$ ghorg clone --match-prefix=frontend --output-dir=design_only +$ ghorg clone --match-regex=^frontend --output-dir=design_only ``` diff --git a/examples/gitlab.md b/examples/gitlab.md index fde47d0..048ed04 100644 --- a/examples/gitlab.md +++ b/examples/gitlab.md @@ -21,5 +21,5 @@ $ ghorg clone / --base-url=https:// --base-url=https:// --scm=gitlab --match-prefix=frontend --output-dir=design_only +$ ghorg clone --base-url=https:// --scm=gitlab --match-regex=^frontend --output-dir=design_only ```