feat: --all flag (#182)

Co-authored-by: Hiroki Osame <hiroki.osame@gmail.com>
This commit is contained in:
Rocktim
2023-04-01 15:49:34 +05:30
committed by GitHub
parent ad2533eb2f
commit ebe83a493e
5 changed files with 55 additions and 5 deletions

View File

@@ -56,10 +56,11 @@ git add <files...>
aicommits
```
`aicommits` passes down unknown flags to `git commit`, so you can pass in [`commit` flags](https://git-scm.com/docs/git-commit) (with some exceptions (e.g. `--all`):
`aicommits` passes down unknown flags to `git commit`, so you can pass in [`commit` flags](https://git-scm.com/docs/git-commit).
For example, you can stage all changes in tracked files with as you commit:
```sh
aicommits --dry-run
aicommits --all # or -a
```
> 👉 **Tip:** Use the `aic` alias if `aicommits` is too long for you.
@@ -73,6 +74,10 @@ aicommits --generate <i> # or -g <i>
> Warning: this uses more tokens, meaning it costs more.
```sh
aicommits --all
```
### Git hook
You can also integrate _aicommits_ with Git via the [`prepare-commit-msg`](https://git-scm.com/docs/githooks#_prepare_commit_msg) hook. This lets you use Git like you normally would, and edit the commit message before committing.