Skip to content

Commit 3a0dfe7

Browse files
committed
Improve documentation
1 parent 9f2fbd1 commit 3a0dfe7

File tree

2 files changed

+62
-5
lines changed

2 files changed

+62
-5
lines changed

README.md

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,23 @@
33
<strong>Communicate important updates to your team via git commit messages</strong>
44
<br><br>
55

6+
## What is git-notify?
7+
8+
Sometimes you want to communicate about important changes, process improvements, new tools etc. to other developers on your project. In a small team, a Slack message will probably do the job, but in larger teams and distributed organizations (such as open source project), reaching everyone can be a pain.
9+
10+
`git-notify` allows you to inject announcements into your git commit messages, that will be displayed to other developers when they pull the changes to their machine.
11+
12+
```sh
13+
git commit -m 'git-notify: NEW PERF TOOLING AVAILABLE ...'
14+
```
15+
616
![Demo](docs/demo.gif)
717

8-
## What is git-notify?
18+
Or, instead of adding messages to individual commits, you can add them to the extended merge/squash commit message on GitHub:
919

10-
I've often ran into a situation where I'd like to communicate a piece of information.
20+
![GitHub PR flow example](docs/github-example.png)
21+
22+
You can change the prefix [git-notify] uses. See [Configuration](#configuration) for how to do this.
1123

1224
## Getting started
1325

@@ -90,6 +102,53 @@ npx git-notify --help
90102
$ git-notify checkout $GIT_PARAMS
91103
```
92104

105+
## About formatting
106+
107+
`git-notify` will display a message for every "git-notify:" prefix it finds in the commit log that was just pulled/merged/rebased/checked out. **The notification message will be the rest of the paragraph following the prefix.** Whitespace will be preserved.
108+
109+
For example, this commit message:
110+
111+
```
112+
This change upgrades some of our dependencies. git-notify: Please run npm install
113+
```
114+
115+
Will print:
116+
117+
```
118+
╒════════════════════════════╕
119+
│ │
120+
│ Please run npm install │
121+
│ │
122+
╘════════════════════════════╛
123+
```
124+
125+
Or:
126+
127+
````
128+
Rewrite everything.
129+
130+
git-notify:EVERYTHING HAS CHANGED
131+
This project has been rewritten
132+
from scratch. If something broke,
133+
please contact Jeff at dev@null.com.
134+
```
135+
136+
Will display:
137+
```
138+
╒══════════════════════════════════════════╕
139+
│ │
140+
│ EVERYTHING HAS CHANGED │
141+
│ This project has been rewritten │
142+
│ from scratch. If something broke, │
143+
│ please contact Jeff at dev@null.com. │
144+
│ │
145+
╘══════════════════════════════════════════╛
146+
147+
148+
### Can I group messages
149+
150+
Not at the moment, but this should not be difficult to add. See [Contributing](#contributing)
151+
93152
## Git Hooks
94153
95154
### Installing with husky
@@ -119,8 +178,6 @@ At this time, `git-notify` is a node-based project. While I recognize it could b
119178
120179
If you like this idea, feel free to steal it and implement your own version for other toolsets!
121180
122-
## Configuration
123-
124181
## Contributing
125182
126183
This project is open to contributions. For anything that would radically change the nature of the project or increase its maintenance burden, please open an issue first to discuss.
@@ -133,7 +190,7 @@ To run TSDX, use:
133190
134191
```bash
135192
yarn start
136-
```
193+
````
137194

138195
This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
139196

docs/github-example.png

115 KB
Loading

0 commit comments

Comments
 (0)