You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-26Lines changed: 28 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,59 +114,61 @@ Note: Use `--yes` to skip interactive confirmations in non-TTY environments.
114
114
115
115
### Git Hook
116
116
117
-
AIGitCommit includes a `prepare-commit-msg` hook that automatically generates commit messages during your workflow. The hook triggers when you run `git commit` or `git commit -m ""`, generates a message from staged changes, and opens your editor for review.
117
+
AIGitCommit includes a `prepare-commit-msg` hook that automatically generates commit messages during your workflow.
118
+
119
+
**Quick install (recommended)**
120
+
121
+
Install into the current repository:
122
+
123
+
```bash
124
+
aigitcommit install-hook .
125
+
```
126
+
127
+
Install into a specific repository:
128
+
129
+
```bash
130
+
aigitcommit install-hook /path/to/repo
131
+
```
132
+
133
+
Prerequisite: `aigitcommit` is installed and available in your `PATH`.
118
134
119
135
**Prerequisites**
120
136
121
137
-`aigitcommit` must be installed and available in your `PATH`
122
138
- Configure required environment variables before committing (see [Configuration](#configuration))
After installation, the hook runs automatically when you execute `git commit`. You can review and edit the generated message before finalizing the commit.
134
-
135
147
**Disable for a single commit**: Use `git commit --no-verify` to bypass the hook.
136
148
137
-
**Global Installation**
149
+
**Global installation (optional)**
138
150
139
-
Set up the hook for all new and existing repositories using Git templates:
0 commit comments