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: shell/README.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,19 +33,16 @@ This script should be used as an **alternative** to using VS Code itself to hand
33
33
34
34
But, if you don't use it as an actual hook, there is an alternative flow that doesn't mess with VS Code. You can use the other script and set up a Git alias (which can be used across projects without setting a hook even).
35
35
36
-
e.g.
36
+
Sample output:
37
37
38
38
```console
39
39
$ ./shell/autofill.sh
40
40
chore: update settings.json
41
-
```
42
-
43
-
```console
44
41
$ ./shell/autofill.sh
45
42
update 11 files
46
43
```
47
44
48
-
Use it. This uses the tool to generate a message and pass it as the Git commit message, but forcing edit mode so you can override it.
45
+
Use it with Git. This uses the tool to generate a message and pass it as the Git commit message, but forcing edit mode so you can override it.
49
46
50
47
```sh
51
48
$ git commit --edit -m "$(shell/autofill.sh)"
@@ -65,14 +62,14 @@ TODO:
65
62
66
63
#### Alias
67
64
68
-
Set this up in git config aliases as `c` or something. If this was in a _bin_ directory, or used with an absolute path to the script. The
65
+
Set this up in git config aliases as `c` or something. If this was in a _bin_ directory, or used with an absolute path to the script.
69
66
70
67
```toml
71
68
[alias]
72
69
c = '! git commit --edit -m "$(autofill.sh)"'
73
70
```
74
71
75
-
Then instead of `git commit`, you do:
72
+
Then instead of `git commit`, you cando:
76
73
77
74
```sh
78
75
$ git c
@@ -87,3 +84,4 @@ stone. But ideally the JS files can be copied outside of this project to a centr
87
84
with a `bin` entry point). And the SH script can be added to an individual project in `.git/hooks` dir as `prepare-commit-msg`.
88
85
- When using this as a hook, consider reading from the **existing** commit message file in the case
0 commit comments