@@ -35,6 +35,7 @@ Use your own emojis by editing the "custom emojis" file listed by `gitmopy info`
35
35
36
36
``` bash
37
37
alias gpy=" gitmopy"
38
+ alias gpys=" gitmopy start"
38
39
alias gpyc=" gitmopy commit"
39
40
alias gpya=" gitmopy commit --add"
40
41
alias gpyk=" gitmopy commit --add --keep-alive"
@@ -54,6 +55,9 @@ $ gitmopy commit --add --keep-alive
54
55
# same using an alias, + push after every commit (could be dangerous)
55
56
$ gpyk --push
56
57
58
+ # use your default commit settings (configured via `gitmopy config`)
59
+ $ gitmopy start
60
+
57
61
58
62
# Specific usage
59
63
# --------------
@@ -98,32 +102,51 @@ $ gitmopy commit --help
98
102
$ gitmopy info
99
103
100
104
gitmopy info:
101
- version : 0.4.2
105
+ version : 0.6.0
102
106
app path : /Users/victor/.gitmopy
103
107
history : /Users/victor/.gitmopy/history.json
104
108
config : /Users/victor/.gitmopy/config.yaml
105
109
custom emojis: /Users/victor/.gitmopy/custom_gitmojis.yaml
106
110
107
111
Current configuration:
108
- skip_scope : False
109
- skip_message : False
110
- capitalize_title: True
111
- enable_history : True
112
- emoji_set : gitmoji
112
+ skip_scope : False
113
+ skip_message : False
114
+ capitalize_title : True
115
+ enable_history : True
116
+ emoji_set : gitmoji
117
+ default_commit_flags: ['add', 'keep_alive', 'sign', 'simple']
118
+ default_commit_args : {'remote': 'origin', 'repo': '.'}
113
119
```
114
120
115
121
Update configuration with
116
122
117
123
``` text
118
124
$ gitmopy config
119
- $ gitmopy config
125
+
120
126
❓ Configure gitmopy locally. Use 'space' to (de-)select, 'enter' to validate.
121
127
❯ ○ Skip commit scope
122
128
○ Skip commit message
123
129
◉ Capitalize commit title
124
130
◉ Remember commit history for auto-complete and emoji sorting
125
131
126
132
Config will be saved in /Users/victor/.gitmopy/config.yaml.
133
+
134
+ ✓ Configure gitmopy locally.
135
+ ❓ Emoji set to use for commits
136
+ ❯ gitmoji
137
+ ai-devmojis
138
+
139
+ ❓ Default commit binary flags used in `gitmopy start`
140
+ ❯ ◉ add
141
+ ○ dry
142
+ ◉ keep_alive
143
+ ○ push
144
+ ◉ sign
145
+ ◉ simple
146
+
147
+ ❓ repo (Path to the git repository): .
148
+
149
+ ❓ remote (Comma-separated list of remotes to push to): origin
127
150
```
128
151
129
152
Get help with
@@ -133,18 +156,22 @@ $ gitmopy --help
133
156
134
157
Usage: gitmopy [OPTIONS] COMMAND [ARGS]...
135
158
136
- ╭─ Options ───────────────────────────────────────────────────────────────────────────╮
137
- │ --install-completion Install completion for the current shell. │
138
- │ --show-completion Show completion for the current shell, to copy it or │
139
- │ customize the installation. │
140
- │ --help Show this message and exit. │
141
- ╰─────────────────────────────────────────────────────────────────────────────────────╯
142
- ╭─ Commands ──────────────────────────────────────────────────────────────────────────╮
143
- │ commit Commit staged files. Use --add to interactively select files to stage if │
144
- │ none is already staged │
145
- │ config Configure gitmopy │
146
- │ info Print gitmopy info │
147
- ╰─────────────────────────────────────────────────────────────────────────────────────╯
159
+ ╭─ Options ───────────────────────────────────────────────────────────────────────╮
160
+ │ --install-completion Install completion for the current shell. │
161
+ │ --show-completion Show completion for the current shell, to copy it │
162
+ │ or customize the installation. │
163
+ │ --help Show this message and exit. │
164
+ ╰─────────────────────────────────────────────────────────────────────────────────╯
165
+ ╭─ Commands ──────────────────────────────────────────────────────────────────────╮
166
+ │ commit Commit staged files. Use --add to interactively select files to stage │
167
+ │ if none is already staged │
168
+ │ config Configure gitmopy │
169
+ │ info Print gitmopy info │
170
+ │ start Runs the commit command with the default arguments you have set in the │
171
+ │ configuration file. If no such arguments are set, you will be prompted │
172
+ │ to set them interactively. │
173
+ ╰─────────────────────────────────────────────────────────────────────────────────╯
174
+
148
175
149
176
$ gitmopy commit --help
150
177
@@ -153,30 +180,66 @@ $ gitmopy commit --help
153
180
Commit staged files. Use --add to interactively select files to stage if none is
154
181
already staged
155
182
156
- ╭─ Options ───────────────────────────────────────────────────────────────────────────╮
157
- │ --repo TEXT Path to the git repository [default: .] │
158
- │ --add --no-add Whether or not to interactively select │
159
- │ files to stage if none is already staged │
160
- │ [default: no-add] │
161
- │ --push --no-push Whether to `git push` after commit. If │
162
- │ multiple remotes exist, you will be asked │
163
- │ to interactively choose the ones to push │
164
- │ to. Use --remote to skip interactive │
165
- │ selection. Disabled by default. │
166
- │ [default: no-push] │
167
- │ --dry --no-dry Whether or not to actually commit. │
168
- │ [default: no-dry] │
169
- │ --remote TEXT Remote to push to after commit. Use to │
170
- │ skip interactive remote selection when │
171
- │ several exist. Use several '--remote │
172
- │ {remote name}' to push to multiple remotes │
173
- │ --keep-alive --no-keep-alive Whether or not to keep the app alive after │
174
- │ commit, to be ready for another one. │
175
- │ [default: no-keep-alive] │
176
- │ --help Show this message and exit. │
177
- ╰─────────────────────────────────────────────────────────────────────────────────────╯
183
+ ╭─ Options ───────────────────────────────────────────────────────────────────────╮
184
+ │ --repo TEXT Path to the git repository │
185
+ │ [default: .] │
186
+ │ --add --no-add Whether or not to interactively select │
187
+ │ files to stage if none is already │
188
+ │ staged │
189
+ │ [default: no-add] │
190
+ │ --push --no-push Whether to `git push` after commit. If │
191
+ │ multiple remotes exist, you will be │
192
+ │ asked to interactively choose the ones │
193
+ │ to push to. Use --remote to skip │
194
+ │ interactive selection. Disabled by │
195
+ │ default. │
196
+ │ [default: no-push] │
197
+ │ --dry --no-dry Whether or not to actually commit. │
198
+ │ [default: no-dry] │
199
+ │ --remote TEXT Remote to push to after commit. Use to │
200
+ │ skip interactive remote selection when │
201
+ │ several exist. Use several '--remote │
202
+ │ {remote name}' to push to multiple │
203
+ │ remotes │
204
+ │ --keep-alive --no-keep-alive Whether or not to keep the app alive │
205
+ │ after commit, to be ready for another │
206
+ │ one. │
207
+ │ [default: no-keep-alive] │
208
+ │ --simple --no-simple Whether or not to use a simple commit │
209
+ │ which merges conventional commits and │
210
+ │ gitmoji. │
211
+ │ [default: no-simple] │
212
+ │ --sign --no-sign Whether or not to sign the commit with │
213
+ │ GPG. Equivalent to `git commit -S`. │
214
+ │ [default: no-sign] │
215
+ │ --help Show this message and exit. │
216
+ ╰─────────────────────────────────────────────────────────────────────────────────╯
178
217
```
179
218
219
+ ## Default commit settings
220
+
221
+ You can configure default settings for the ` gitmopy start ` command which will run ` gitmopy commit ` with your preferred arguments. To set these up:
222
+
223
+ 1 . Run ` gitmopy config `
224
+ 2 . Navigate to "Default commit binary flags used in ` gitmopy start ` "
225
+ 3 . Select the flags you want enabled by default (e.g., ` add ` , ` keep-alive ` , ` push ` , etc.)
226
+ 4 . Navigate to "Default commit arguments used in ` gitmopy start ` "
227
+ 5 . Configure:
228
+ - ` repo ` : Path to your git repository (default: ".")
229
+ - ` remote ` : Comma-separated list of remotes to push to (default: "origin")
230
+
231
+ Then simply run ` gitmopy start ` to use your default settings!
232
+
233
+ For example, if you always want to:
234
+
235
+ - Work in the current directory
236
+ - Be able to select files to stage
237
+ - Keep committing until you're done
238
+ - Sign your commits
239
+ - Push to origin
240
+
241
+ Configure these settings once with ` gitmopy config ` and just run ` gitmopy start ` instead of ` gitmopy commit --add --keep-alive --push --remote origin --sign ` !
242
+
180
243
## To Do
181
244
182
245
- Features
0 commit comments