From 838167c4d3bcbe2fa28f27a00bd94b959ad31e15 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 20 Apr 2020 20:06:30 -0700 Subject: [PATCH] Describe in FAQ creating torrent from git repo type: documentation --- CHANGELOG.md | 3 ++- bin/gen/config.yaml | 16 ++++++++++++++++ book/src/faq.md | 19 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b43526..909248e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ Changelog UNRELEASED - 2020-04-21 ----------------------- -- :sparkles: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Optionally respect `.gitignore` in `imdl torrent create` - Fixes [#378](https://github.com/casey/intermodal/issues/378) - _Celeo _ +- :books: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Describe in FAQ creating torrent from git repo - _Casey Rodarmor _ +- :sparkles: [`9b72873ed13e`](https://github.com/casey/intermodal/commit/9b72873ed13e8f0ae747714545c48c6e37c67dd0) Optionally respect `.gitignore` in `imdl torrent create` - Fixes [#378](https://github.com/casey/intermodal/issues/378) - _Celeo _ - :books: [`9f480624616b`](https://github.com/casey/intermodal/commit/9f480624616b77995befec722effda22cc2d06ad) Improve FAQ template - _Casey Rodarmor _ - :wrench: [`1380290eb8e2`](https://github.com/casey/intermodal/commit/1380290eb8e222605f368bc8346a1e63c83d9af7) Make `publish-check` recipe stricter - _Casey Rodarmor _ diff --git a/bin/gen/config.yaml b/bin/gen/config.yaml index ac254f7..0cee6e9 100644 --- a/bin/gen/config.yaml +++ b/bin/gen/config.yaml @@ -135,3 +135,19 @@ faq: This can be used to, for example, preview the torrents in a directory: find . -name '*.torrent' | fzf --preview='imdl -c always -t torrent show -i {}' + +- title: Can intermodal be used to create a torrent from a Git repo? + anchor: git-repo + text: |- + Yes! The `--ignore` flag, contributed by [@Celeo](https://github.com/Celeo), can be used + to make `imdl torrent create` respect `.gitignore` files: + + imdl torrent create --ignore --include-hidden --include-junk --glob '!.git/*' --input . + + In addition to `--ignore`, `--include-hidden`, `--include-junk`, and `--glob '!.git/*'` + are used to include files, like `.gitignore`, that are present in the repo but would + otherwise be skipped, and to skip the contents of the `.git` directory. + + Equivalently, with short flags: + + imdl torrent create --ignore -hjg '!.git/*' -i . diff --git a/book/src/faq.md b/book/src/faq.md index 2150883..04c9a36 100644 --- a/book/src/faq.md +++ b/book/src/faq.md @@ -4,6 +4,8 @@ FAQ - [Can intermodal be used to preview torrents with `fzf`?](#fzf-preview) +- [Can intermodal be used to create a torrent from a Git repo?](#git-repo) + @@ -19,3 +21,20 @@ _Note the use of `--color always` and `--terminal` to force colored, human reada This can be used to, for example, preview the torrents in a directory: find . -name '*.torrent' | fzf --preview='imdl -c always -t torrent show -i {}' + + +## Can intermodal be used to create a torrent from a Git repo? + + +Yes! The `--ignore` flag, contributed by [@Celeo](https://github.com/Celeo), can be used +to make `imdl torrent create` respect `.gitignore` files: + + imdl torrent create --ignore --include-hidden --include-junk --glob '!.git/*' --input . + +In addition to `--ignore`, `--include-hidden`, `--include-junk`, and `--glob '!.git/*'` +are used to include files, like `.gitignore`, that are present in the repo but would +otherwise be skipped, and to skip the contents of the `.git` directory. + +Equivalently, with short flags: + + imdl torrent create --ignore -hjg '!.git/*' -i .