Skip to content

Commit 79b1008

Browse files
committed
Merge branch 'dev'
2 parents 3c0a271 + 0c8bf55 commit 79b1008

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
<img src=".github/opencommit-example.png" alt="OpenCommit example"/>
1717
</div>
1818

19-
All the commits in this repo are done with OpenCommit — look into [the commits](https://github.com/di-sukharev/opencommit/commit/eae7618d575ee8d2e9fff5de56da79d40c4bc5fc) to see how OpenCommit works. Emoji and long commit description text is configurable.
19+
All the commits in this repo are authored by OpenCommit — look at [the commits](https://github.com/di-sukharev/opencommit/commit/eae7618d575ee8d2e9fff5de56da79d40c4bc5fc) to see how OpenCommit works. Emojis and long commit descriptions are configurable.
2020

21-
## Setup OpenCommit as a Github Action 🔥
21+
## Setup OpenCommit as a GitHub Action 🔥
2222

2323
OpenCommit is now available as a GitHub Action which automatically improves all new commits messages when you push to remote!
2424

25-
This is great if you want to make sure all of the commits in all of repository branches are meaningful and not lame like `fix1` or `done2`.
25+
This is great if you want to make sure all of the commits in all of your repository branches are meaningful and not lame like `fix1` or `done2`.
2626

27-
Create a file `.github/workflows/opencommit.yml` with contents below:
27+
Create a file `.github/workflows/opencommit.yml` with the contents below:
2828

2929
```yml
3030
name: 'OpenCommit Action'
@@ -68,31 +68,31 @@ jobs:
6868
OCO_LANGUAGE: en
6969
```
7070
71-
That is it. Now when you push to any branch in your repo — all NEW commits are being improved by never-tired-AI.
71+
That is it. Now when you push to any branch in your repo — all NEW commits are being improved by your never-tired AI.
7272
73-
Make sure you exclude public collaboration branches (`main`, `dev`, `etc`) in `branches-ignore`, so OpenCommit does not rebase commits there when improving the messages.
73+
Make sure you exclude public collaboration branches (`main`, `dev`, `etc`) in `branches-ignore`, so OpenCommit does not rebase commits there while improving the messages.
7474

75-
Interactive rebase (`rebase -i`) changes commit SHA, so commit history in remote becomes different with your local branch history. It's ok when you work on the branch alone, but may be inconvenient for other collaborators.
75+
Interactive rebase (`rebase -i`) changes commits' SHA, so the commit history in remote becomes different from your local branch history. This is okay if you work on the branch alone, but may be inconvenient for other collaborators.
7676

77-
## Setup OpenCommit as a CLI
77+
## Setup OpenCommit as a CLI tool
7878

79-
You can use OpenCommit by simply running it via CLI like this `oco`. 2 seconds and your staged changes are committed with a meaningful message.
79+
You can use OpenCommit by simply running it via the CLI like this `oco`. 2 seconds and your staged changes are committed with a meaningful message.
8080

8181
1. Install OpenCommit globally to use in any repository:
8282

8383
```sh
8484
npm install -g opencommit
8585
```
8686

87-
2. Get your API key from [OpenAI](https://platform.openai.com/account/api-keys). Make sure you add payment details, so API works.
87+
2. Get your API key from [OpenAI](https://platform.openai.com/account/api-keys). Make sure that you add your payment details, so the API works.
8888

8989
3. Set the key to OpenCommit config:
9090

9191
```sh
9292
opencommit config set OCO_OPENAI_API_KEY=<your_api_key>
9393
```
9494

95-
Your api key is stored locally in `~/.opencommit` config file.
95+
Your API key is stored locally in the `~/.opencommit` config file.
9696

9797
## Usage
9898

@@ -107,19 +107,19 @@ You can also use the `oco` shortcut:
107107

108108
```sh
109109
git add <files...>
110-
oc
110+
oco
111111
```
112112

113113
## Configuration
114114

115115
### Local per repo configuration
116116

117-
Create an `.env` file and add OpenCommit config variables there like this:
117+
Create a `.env` file and add OpenCommit config variables there like this:
118118

119119
```env
120-
OCO_OPENAI_API_KEY=<your openAI API token>
121-
OCO_OPENAI_MAX_TOKENS=<max response tokens from openAI API>
122-
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to openAI api>
120+
OCO_OPENAI_API_KEY=<your OpenAI API token>
121+
OCO_OPENAI_MAX_TOKENS=<max response tokens from OpenAI API>
122+
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI api>
123123
OCO_DESCRIPTION=<postface a message with ~3 sentences description>
124124
OCO_EMOJI=<add GitMoji>
125125
OCO_MODEL=<either gpt-3.5-turbo or gpt-4>
@@ -129,9 +129,9 @@ OCO_MESSAGE_TEMPLATE_PLACEHOLDER=<message template placeholder, example: '$msg'>
129129

130130
### Global config for all repos
131131

132-
Local config still has more priority as Global config, but you may set `OCO_MODEL` and `OCO_LOCALE` globally and set local configs for `OCO_EMOJI` and `OCO_DESCRIPTION` per repo which is more convenient.
132+
Local config still has more priority than Global config, but you may set `OCO_MODEL` and `OCO_LOCALE` globally and set local configs for `OCO_EMOJI` and `OCO_DESCRIPTION` per repo which is more convenient.
133133

134-
Simply run any of the variable above like this:
134+
Simply set any of the variables above like this:
135135

136136
```sh
137137
oco config set OCO_OPENAI_API_KEY=gpt-4
@@ -143,23 +143,23 @@ Configure [GitMoji](https://gitmoji.dev/) to preface a message.
143143
oco config set OCO_EMOJI=true
144144
```
145145

146-
To remove preface emoji:
146+
To remove preface emojis:
147147

148148
```sh
149149
oco config set OCO_EMOJI=false
150150
```
151151

152152
### Switch to GPT-4
153153

154-
By default OpenCommit uses GPT-3.5-turbo (ChatGPT).
154+
By default, OpenCommit uses GPT-3.5-turbo (ChatGPT).
155155

156156
You may switch to GPT-4 which performs better, but costs ~x15 times more 🤠
157157

158158
```sh
159159
oco config set OCO_MODEL=gpt-4
160160
```
161161

162-
Make sure you do lowercase `gpt-4` and you have API access to the 4th model. Even if you have ChatGPT+ it doesn't necessarily mean that you have API access to GPT-4.
162+
Make sure that you spell it `gpt-4` (lowercase) and that you have API access to the 4th model. Even if you have ChatGPT+, that doesn't necessarily mean that you have API access to GPT-4.
163163

164164
## Locale configuration
165165

@@ -177,7 +177,7 @@ oco config set OCO_LANGUAGE=French
177177
oco config set OCO_LANGUAGE=française
178178
```
179179

180-
The default language set is **English**
180+
The default language setting is **English**
181181
All available languages are currently listed in the [i18n](https://github.com/di-sukharev/opencommit/tree/master/src/i18n) folder
182182

183183
### Git flags
@@ -204,20 +204,20 @@ oco '$msg #205’
204204

205205
### Ignore files
206206

207-
You can ignore files from submission to OpenAI by creating a `.opencommitignore` file. For example:
207+
You can remove files from being sent to OpenAI by creating a `.opencommitignore` file. For example:
208208

209209
```ignorelang
210210
path/to/large-asset.zip
211211
**/*.jpg
212212
```
213213

214-
This is useful for preventing opencommit from uploading artifacts and large files.
214+
This helps prevent opencommit from uploading artifacts and large files.
215215

216216
By default, opencommit ignores files matching: `*-lock.*` and `*.lock`
217217

218218
## Git hook (KILLER FEATURE)
219219

220-
You can set OpenCommit as Git [`prepare-commit-msg`](https://git-scm.com/docs/githooks#_prepare_commit_msg) hook. Hook integrates with you IDE Source Control and allows you edit the message before commit.
220+
You can set OpenCommit as Git [`prepare-commit-msg`](https://git-scm.com/docs/githooks#_prepare_commit_msg) hook. Hook integrates with your IDE Source Control and allows you to edit the message before committing.
221221

222222
To set the hook:
223223

@@ -242,4 +242,4 @@ Or follow the process of your IDE Source Control feature, when it calls `git com
242242

243243
## Payments
244244

245-
You pay for your own requests to OpenAI API. OpenCommit uses ChatGPT (3.5-turbo) official model, that is ~15x times cheaper than GPT-4.
245+
You pay for your requests to OpenAI API. OpenCommit uses ChatGPT (3.5-turbo) official model, which is ~15x times cheaper than GPT-4.

0 commit comments

Comments
 (0)