gitmoji的Python命令行
项目描述
gitmopy
Gitmoji约定的交互式Python实现: gitmoji.dev/
pip install gitmopy
如何使用
- 我通常使用
$ gitmopy commit --add --keep-alive
- 使用 ⬆️ 和 ⬇️ 导航选项
- 选择 选项使用
空格
- 验证 选择使用
enter
- 按
tab
自动完成- 在空行上按
tab
查看历史记录
- 在空行上按
- 重新启动提交 使用
crtl+c
- 键盘中断将被捕获一次,然后按
enter
重新启动
- 键盘中断将被捕获一次,然后按
- 推送(并在需要的情况下设置上游)
- 再次提交 🔄
您也可以通过运行 gitmopy config
然后按 Enter
并选择 ai-devmojis
作为配置选项来选择针对AI/ML开发量身定制的另一组默认表情符号。
通过编辑 gitmopy info
列出的 "custom emojis" 文件来使用您自己的表情符号!
建议的快捷方式
alias gpy="gitmopy"
alias gpyc="gitmopy commit"
alias gpya="gitmopy commit --add"
alias gpyk="gitmopy commit --add --keep-alive"
示例
# Typical daily use-case
# ----------------------
# continuously commit, interactively select files to stage
$ gitmopy commit --add --keep-alive
# same using an alias, + push after every commit (could be dangerous)
$ gpyk --push
# Specific usage
# --------------
# commit currently staged files. Will fail if no file is staged.
$ gitmopy commit
# Enable interactive file selection if no file is currently staged. Ignored if
# there are staged files.
$ gitmopy commit --add
# Commit continuously: don't leave the CLI after the first commit but restart
# the commit procedure.
$ gitmopy commit --keep-alive
# Push to remote repositories after commit.
# Interactively select remotes to push to if there are more than 1.
$ gitmopy commit --push
# Push to specific remotes
$ gitmopy commit --push --remote origin --remote upstream
# Make and display a commit message without staging/committing/pushing
$ gitmopy commit --dry
# configure gitmopy
$ gitmopy config
# print version, data paths and current configuration
$ gitmopy info
# print helps
$ gitmopy --help
$ gitmopy commit --help
⚠️ 同步功能仍然是实验性的。它将 pull
然后 push
,但在有多个远程分支且其中一个分支不存在的情况下,我建议您使用 git
手动处理。
用户指南
$ gitmopy info
gitmopy info:
version : 0.4.2
app path : /Users/victor/.gitmopy
history : /Users/victor/.gitmopy/history.json
config : /Users/victor/.gitmopy/config.yaml
custom emojis: /Users/victor/.gitmopy/custom_gitmojis.yaml
Current configuration:
skip_scope : False
skip_message : False
capitalize_title: True
enable_history : True
emoji_set : gitmoji
使用以下方式更新配置
$ gitmopy config
$ gitmopy config
❓ Configure gitmopy locally. Use 'space' to (de-)select, 'enter' to validate.
❯ ○ Skip commit scope
○ Skip commit message
◉ Capitalize commit title
◉ Remember commit history for auto-complete and emoji sorting
Config will be saved in /Users/victor/.gitmopy/config.yaml.
使用以下方式获取帮助
$ gitmopy --help
Usage: gitmopy [OPTIONS] COMMAND [ARGS]...
╭─ Options ───────────────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or │
│ customize the installation. │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────╮
│ commit Commit staged files. Use --add to interactively select files to stage if │
│ none is already staged │
│ config Configure gitmopy │
│ info Print gitmopy info │
╰─────────────────────────────────────────────────────────────────────────────────────╯
$ gitmopy commit --help
Usage: gitmopy commit [OPTIONS]
Commit staged files. Use --add to interactively select files to stage if none is
already staged
╭─ Options ───────────────────────────────────────────────────────────────────────────╮
│ --repo TEXT Path to the git repository [default: .] │
│ --add --no-add Whether or not to interactively select │
│ files to stage if none is already staged │
│ [default: no-add] │
│ --push --no-push Whether to `git push` after commit. If │
│ multiple remotes exist, you will be asked │
│ to interactively choose the ones to push │
│ to. Use --remote to skip interactive │
│ selection. Disabled by default. │
│ [default: no-push] │
│ --dry --no-dry Whether or not to actually commit. │
│ [default: no-dry] │
│ --remote TEXT Remote to push to after commit. Use to │
│ skip interactive remote selection when │
│ several exist. Use several '--remote │
│ {remote name}' to push to multiple remotes │
│ --keep-alive --no-keep-alive Whether or not to keep the app alive after │
│ commit, to be ready for another one. │
│ [default: no-keep-alive] │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────╯
待办事项
- 功能
- 如果需要
- 安装钩子
git commit
标志(如-S
)- 最大历史长度(如果加载json变慢)
- 如果需要
- 测试
- 文档
- 非关键
资源
gitmopy
受到 gitmoji-cli
的启发。
它是在以下帮助下构建的
项目详情
下载文件
下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源代码分发
gitmopy-0.4.2.tar.gz (20.7 kB 查看哈希值)
构建分发
gitmopy-0.4.2-py3-none-any.whl (21.8 kB 查看哈希值)
关闭
gitmopy-0.4.2.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 444899cdb47955fe52d624ccb00370db1eb545adeed4e41ae07015815573af9e |
|
MD5 | 2bac9639ba2c4f6414c293d2bef47fa9 |
|
BLAKE2b-256 | 9a8780b0bb72608b5fe452a778f4aff9ffa0b23cf7f7d29766a3296d85294e8c |
关闭
gitmopy-0.4.2-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 580753222ba927cdaeb11c5f27eda331f8b96bf3efe35d4040bb560961a024b9 |
|
MD5 | 77188daeb5327c70d29dc3e687f45024 |
|
BLAKE2b-256 | 4e6b1dc879e7e5f469812ef53a3999b9b83de19853a511b8860e40f6375a85c7 |