Giter Club home page Giter Club logo

gcr's Introduction

GRC

GRC Rust Release Codacy Badge codecov

Compact specification git commit tool, written in Rust, it has a variety of practical small functions.

Similar to git-cz, GRC will help you to provide a better git commit experience.

Install

You can install grc in the following ways:

From crates.io

grc has very few dependencies, and you can build it very quickly and easily!

Please Run:

cargo install grc

Release Package

Go to RELEASE, download one you like.

From Source

Please Run:

cargo install --git https://github.com/sdttttt/gcr.git

Using

after the tools install, run command in your repository:

grc

GRC can also automatically help you add files to the index.

//Add all files
grc -a .

// Add specified file
grc -a <filename>...

GRC config file

TIP: This feature is supported above version 0.9.0

You can append custom commit types in the grc.toml configuration file at repo root directory: Starting with 0.9.1, grc using ~/.config/grc/grc.toml as the default configuration file.

# A colon separates the type from the description of the type.
type = [
    "type: this is new commit type."
]

# Starting with **1.0.0**, grc can enhance your submission with the `--emoji` command line argument.
emoji = true

# You can also use `overwrite_emoji` to enhance custom submission types or override basic submission types in GRC.
overwrite_emoji = [
    "deps:🚕", # Appends an emoji to a custom submission type
    "test:🚗"  # Test is a GRC built-in submission type that you can override.
]


# [Beta] Starting with **1.2.0**, Added two new options to the configuration file, `pre` and `after`, which are similar to githook. Here you can enter the actions of the commands before and after COMMIT.
pre = [
"cargo test"
]

after = [
"echo Ok!"
]

Plug (experimental)

This feature is not enabled in the default version and needs to be set in the build. Add --features plug to the cargo build command to enable the plugin.

plug are a new feature added in 1.1.0. Details of the plug-in and usage can be found here.

IDEA

If you have any new ideas, you are welcome to talk to me.

GRC repo is used GRC to commit!

gcr's People

Contributors

codacy-badger avatar dependabot[bot] avatar forsworns avatar sdttttt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gcr's Issues

failed to install

encounter an error when i run cargo install grc

error: failed to compile `grc v1.2.0`, intermediate artifacts can be found at `/tmp/cargo-installBHdw34`

Caused by:
  failed to select a version for the requirement `zeroize = "^0.9.3"`
  candidate versions found which didn't match: 1.3.0, 1.2.0, 1.1.1, ...
  location searched: crates.io index
  required by package `dialoguer v0.7.1`
      ... which is depended on by `grc v1.2.0`

Did not check type.

Maybe I missed part of it. If the type of the grc.toml clock does not use symbols to separate types and descriptions, something unexpected will probably happen.

[Bug Report] 1st commit after git init failed

Steps to reproduce

  1. git init
  2. touch README.md, git add README.md
  3. grc, then failed
❯ grc
✔ Which scope? (Optional) ·
✔ Commit Message ? · 1st commit
✔ Provide a longer description? (Optional) ·
✔ PR & Issues this commit closes, e.g 123: (Optional) ·
GRC: feat: 1st commit
GRC: reference 'refs/heads/master' not found

Environments

  • grc version: v1.0.0 from release page. grc --version GRC 1..0.0.beta.1
  • git version: 2.30.1
  • OS: macOS 10.14.6

Feature: Settings from the outside.

Add configuration files belonging to grc to the warehouse file, through which some actions of grc can be changed.

An action that can be changed through a configuration file.

  • Customize the submission type and scope.

commits generated by grc are not properly signed

By default, if signingKey is specified in ~/.gitconfig, git will automatically sign the commit using gpg. But when using grc, commits are not signed.

git log --show-signature

image

My gitconfig:

mgt in ~
❯ cat .gitconfig
[user]
    name = mgt
    email = [email protected]
    signingKey = 7965BF43A2143DD26F1A4850362C4BEE95C1C2DF
[commit]
    gpgSign = true

I've searched git2's document, and I guess it is possible to implement this feature. See https://docs.rs/git2/0.13.17/git2/struct.Repository.html#method.commit_signed .

[Feature] Add reuse commit message.

In some cases, you may want a submission message to be reused over and over again.
(for example, when a locally built dist must be submitted to the warehouse)

More suitable for everyone

考虑到每个人的习惯, 我建议多加一些命令选项.

如下:

grc push <file_name> # 自动Add 该文件到index, 输入commit 信息,自动推送,  如果 file_name 是`.` 那么自动添加所有文件

grc add <file_name> # 自动Add 该文件到index, 输入commit 信息, 如果 file_name 是`.` 那么自动添加所有文件

env GIT_AUTHOR_NAME is not used

I use direnv to export env GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL ... in specific directory to change author and committer. Seems these environment variables are not used.

How temporary is the name?

Hi, your readme/about page mentions that grc is a temporary name. Is it likely to change in the near future?

I am developing a new crate that I'd hoped to use the name grc for. I'm happy to change the name as it's still very much a work in progress but if this will be changing soon I'll leave it as it is.

Thanks and good luck with the project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.