docs: Document the --exclude flag
This commit is contained in:
@@ -11,7 +11,7 @@ Let's try it out:
|
|||||||
## Get the example configuration
|
## Get the example configuration
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ curl --proto '=https' --tlsv1.2 -sSfO https://raw.githubusercontent.com/hakoerber/git-repo-manager/master/example.config.toml
|
curl --proto '=https' --tlsv1.2 -sSfO https://raw.githubusercontent.com/hakoerber/git-repo-manager/master/example.config.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, you're ready to run the first sync. This will clone all configured
|
Then, you're ready to run the first sync. This will clone all configured
|
||||||
@@ -30,7 +30,7 @@ $ grm repos sync config --config example.config.toml
|
|||||||
|
|
||||||
If you run it again, it will report no changes:
|
If you run it again, it will report no changes:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ grm repos sync config -c example.config.toml
|
$ grm repos sync config -c example.config.toml
|
||||||
[✔] git-repo-manager: OK
|
[✔] git-repo-manager: OK
|
||||||
[✔] dotfiles: OK
|
[✔] dotfiles: OK
|
||||||
@@ -43,11 +43,18 @@ write a configuration from scratch. Luckily, GRM has a way to generate a
|
|||||||
configuration from an existing file tree:
|
configuration from an existing file tree:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ grm repos find local ~/your/project/root > config.toml
|
grm repos find local ~/your/project/root > config.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
This will detect all repositories and remotes and write them to `config.toml`.
|
This will detect all repositories and remotes and write them to `config.toml`.
|
||||||
|
|
||||||
|
You can exclude repositories from the generated configuration by providing
|
||||||
|
a regex that will be test against the path of each discovered repository:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
grm repos find local ~/your/project/root --exclude "^.*/subdir/match-(foo|bar)/.*$" > config.toml
|
||||||
|
```
|
||||||
|
|
||||||
### Show the state of your projects
|
### Show the state of your projects
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -65,7 +72,7 @@ $ grm repos status --config example.config.toml
|
|||||||
You can also use `status` without `--config` to check the repository you're
|
You can also use `status` without `--config` to check the repository you're
|
||||||
currently in:
|
currently in:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ cd ~/example-projects/dotfiles
|
$ cd ~/example-projects/dotfiles
|
||||||
$ grm repos status
|
$ grm repos status
|
||||||
╭──────────┬──────────┬────────┬──────────┬───────┬─────────╮
|
╭──────────┬──────────┬────────┬──────────┬───────┬─────────╮
|
||||||
|
|||||||
Reference in New Issue
Block a user