Crates.io | git-revise |
lib.rs | git-revise |
version | 0.1.8 |
source | src |
created_at | 2024-03-18 08:36:48.056032 |
updated_at | 2024-09-29 02:54:58.682008 |
description | A command line utility for better commit |
homepage | https://github.com/vainjoker/revise |
repository | https://github.com/vainjoker/revise |
max_upload_size | |
id | 1177429 |
size | 172,426 |
Interactive CLI that generate standardized git commit messages
Explore the docs
·
Report Bug
·
Request Feature
Revise is an interactive command-line interface (CLI) tool that generates standardized git commit messages. It allows you to amend and enhance your commit messages, making them more informative and clear.
To use git-revise, you have the option to create a toml file called revise.toml
in the project directory or your local config directory. This file allows you to customize the configuration settings for git-revise. However, it's important to note that you can still use git-revise without creating these files, as it will use the default configuration.
For example, you can configure git-revise by creating a revise.toml file with the following content:
types = [
{ key= "feat", value= "A new feature"},
{ key= "fix", value= "A bug fix"},
{ key= "docs", value= "Documentation only changes"},
{ key= "style", value= "Changes that do not affect the meaning of the code"},
{ key= "refactor", value= "A code change that neither fixes a bug nor adds a feature"},
{ key= "perf", value= "A code change that improves performance"},
{ key= "test", value= "Adding missing tests or correcting existing tests"},
{ key= "build", value= "Changes that affect the build system or external dependencies"},
{ key= "ci", value= "Changes to our CI configuration files and scripts"},
{ key= "chore", value= "Other changes that don't modify src or test files"},
{ key= "revert", value= "Reverts a previous commit"}
]
emojis = [
{ key= "feat", value="✨"},
{ key= "fix", value="🐛"},
{ key= "docs", value="📚"},
{ key= "style", value="🎨"},
{ key= "refactor", value="♻️"},
{ key= "perf", value="⚡️"},
{ key= "test", value="✅"},
{ key= "build", value="📦️"},
{ key= "ci", value="🪶"},
{ key= "chore", value="🔨"},
{ key= "revert", value="◀️"}
]
api_key.gemini_key = "{{env}}"
scopes = [
"revise",
"config",
"test",
"docs"
]
exclude_files = [
"CHANGELOG.md"
]
template = """
{{commit_icon}} {{ commit_type }}{% if commit_scope %}({{commit_scope}}){% endif %}{% if commit_breaking %}{{commit_breaking_symbol}}{% endif %}: {{ commit_subject }}{% if commit_issue %}({{commit_issue}}){% endif %}
{% if commit_body %}\n{{ commit_body }}{% endif %}
{% if commit_breaking %}\n{{ commit_breaking }}{% endif %}
"""
[translation]
from = "中文"
to = "English"
[auto]
[auto.git]
add = false
push = false
diff = false
footer = false
[auto.commit]
content = false
footer = false
[hooks]
pre-add = [
{ command = "cargo clippy --fix --allow-dirty --allow-staged", order = 1 },
{ command = "cargo make", order = 2 },
]
post-add = [
{ command = "git status", order = 1 },
]
pre-commit = [
]
post-commit = [
]
This is an example of how to list things you need to use the software and how to install them.
In order to install, just run the following command
cargo install --force git-revise
This will install git-revise in your ~/.cargo/bin
.
Make sure to add ~/.cargo/bin
directory to your PATH
variable.
You can use it simply type
git revise
or
git-revise
See the open issues for a full list of proposed features (and known issues).
Distributed under the GPL-3.0 License. See LICENSE
for more information.