Code Monkey home page Code Monkey logo

gcommit's Introduction

gcommit

一个轻量级,简单易用的提交git commit message的工具

  • 使用标准的headerbodyfooter格式提交
  • 即使bodyfooter为空,也依然会提交body、footer字样的message。目的是完整性和易读性。
  • 中文提示
  • 只 commit 在 __stage区__的文件
  • 只生成并提交 commit message 的内容
  • 可在commit后打tag
  • 可在commit、tag后push到远程仓库

install

go get -u github.com/ichsonx/gcommit

将编译后的程序加入到环境变量中,方便命令行使用。

useage

当需要commit的时候,直接运行即可。会有提示一步一步边界快速完成标准的git message。

  • 值得注意的是,在body、footer输入时,可直接【回车】跳过。但若是已经有输入内容了,要结束时,需要回车新起一行输入eof来结束当前输入。
  • 即使bodyfooter都没有内容,但最终生成的git message会仍然保留它们的标签与格式内容。目的是为了易读性。
  • 关闭issue和不兼容声明,需要自己主动输入(footer部分会有提示)。因为issue输入在哪个部分相对于某些平台也是生效的,这里不做严格规定。
【0】feat:新功能(feature)
【1】fix:修补bug
【2】docs:文档(documentation)
【3】style:格式(不影响代码运行的变动)
【4】refactor:重构(即不是新增功能,也不是修改bug的代码变动)
【5】test:增加测试
【6】build:(以前称chore)构建系统(涉及脚本、配置或工具)和包依赖项相关的开发更改
【7】perf:性能提升相关的更改
【8】vendor:更新依赖项、包的版本
  1. 基本用法
gcommit
  1. 命令行说明
gcommit -h
  1. 提交后自动push
gcommit -p
  1. 提交并打tag
# 提交并打tag
gcommit -t v0.0.1

# 提交打tag,并给tag添加注解。如果没有标记-t,则-tm标记功能会被忽略
gcommit -t v0.0.2 -tm 注解内容

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.