git-semantic-commits

Tiny semantic commit messages for Git.
授权协议 Readme
开发语言 SHELL
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 罗浩然
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Semantic Git commit messages

Inspired by Sparkbox's awesome article on semantic commit messages.

What is this?

These are very simple custom git commands that enforce the git user to write better git commit messages. If still confused, read the article above.

Installation:

  1. Clone this repo, preferably in your $HOME directory.
git clone https://github.com/fteem/git-semantic-commits ~/.git-semantic-commits

Tip: If you're using Cygwin, open it and type echo $USERPROFILE. This will show you the location of the $HOME directory.

  1. Install it as a set of bash scripts or git aliases:
  • bash scripts
cd ~/.git-semantic-commits && ./install.sh --scripts
  • git aliases
cd ~/.git-semantic-commits && ./install.sh

Tip: Installation script is idempotent and could be harmlessly executed multiple times. It adds bash scripts to the PATH in your ~/.bashrc or ~/.zshrc files or adds git aliases to the ~/.gitconfig file respectively (without any duplication).

  1. Commit away!

Usage

There are 8 new Git commands now.

New command -> what it does:

  • git feat "commit message here" -> git commit -m 'feat: commit message here'
  • git docs "commit message here" -> git commit -m 'docs: commit message here'
  • git chore "commit message here" -> git commit -m 'chore: commit message here'
  • git fix "commit message here" -> git commit -m 'fix: commit message here'
  • git refactor "commit message here" -> git commit -m 'refactor: commit message here'
  • git style "commit message here" -> git commit -m 'style: commit message here'
  • git test "commit message here" -> git commit -m 'test: commit message here'
  • git localize "commit message here" -> git commit -m 'localize: commit message here'

If you would like to add an optional scope, as described here, use the '-s' flag and quote the scope message:

  • git docs -s "scope here" "commit message here" -> git commit -m 'docs(scope here): commit message here'

If you would still like to use your text editor for your commit messagesyou can omit the message, and do your commit message in your editor.

  • git feat -> git commit -m 'feat: ' -e

Aliases for those who use git-extras (will be installed only if you have git-extras):

  • git rf "commit message here" -> git commit -m 'refactor: commit message here'
  • git ch "commit message here" -> git commit -m 'chore: commit message here'

Uninstallation

You can manually uninstall git-semantic-commits by:

  • Removing the added aliases from ~/.gitconfig.
  • Removing the line added to the $PATH variable from ~/.bashrc.

How to contribute

Open a pull request/issue or fork this repo and submit your changes via a pull request.

  • Conventional Commits (代码提交说明规范) Conventional Commits 是关于Git Commit 提交代码时, 填写的说明文字的一个规范. 这个规范提供了一套易于理解和使用的规则, 通过描述提交消息中的特性, 修复和重大更改, 创建易于阅读的提交历史, 也方便在其之上编写自动化工具. 提交时的消息格式应该按如下格式组织: <type>[optional scop

  • hg和git命令对照表 来源 https://github.com/sympy/sympy/wiki/Git-hg-rosetta-stone   Git hg rosetta stone   muxator edited this page on 10 Mar 2017 ·  50 revisions The sympy git server is at https://github.com/s

  • git最佳实践 by Hemal Patel 通过赫马尔·帕特尔 Git最佳实践如何为我节省大量的返工时间 (How Git best practices saved me hours of rework) Recently I was working on the task to upgrade a certificate for a NodeJS application. This was l

  • hg和git命令对照表 来源 https://github.com/sympy/sympy/wiki/Git-hg-rosetta-stone   Git hg rosetta stone   muxator edited this page on 10 Mar 2017 ·  50 revisions The sympy git server is at https://github.com/s

  • 因为入职至今,公司也没有太规定一个代码提交规范,所以一直以来,我代码提交的commit message都是简单的一句话说明了本次代码改动内容,有时候会更加精简。 但时间长了之后,当我需要回头找一下某次提交记录的时候,就会发现不太好找,首先没有一个具体的分类,比如是添加功能、还是修复bug、还是更新文档等等;其次就是有一些message写得不是很清晰,不太能一眼明了那次改动是什么内容。 后来决定,需

  • Angular 工具篇系列教程目录: 目前很多的项目都已经使用 Git 作为版本控制工具,使用 Git 意味着我们每天都要与 Git Commit Message 打交道。Git Commit Message 看似简单,但实际却很重要。通过 Git Commit Message 我们可以快速地了解本次提交的信息,比如解决了哪个 Bug、优化了什么问题或新增了什么功能等。 俗话说得好,无规矩不成方圆

 相关资料
  • semantic 是一个 Haskell 库和命令行工具,用来解析、分析和比较程序代码。 使用方法: Parse Usage: semantic parse ([--sexpression] | [--json] | [--json-graph] | [--symbols] | [--dot] | [--show] | [--quiet]) [FILES.

  • Semantic MediaWiki (SMW) 是一个免费开源的 MediaWiki 扩展,可让你存储和查询 Wiki 页面的数据。 Semantic MediaWiki 也是一个完全成熟的框架,结合了很多其他扩展可以让 Wiki 变成一个强大而且灵活的协作数据库,所有在 SMW 中创建的数据可轻松通过语义网络发布,允许其他系统无缝的访问这些数据。

  • angular-semantic 是 AngularJS 支持 Semantic UI 模块的指令,是 AngularJS 的 Semantic UI 扩展。 依赖 Semantic-UI AngularJS Global DevDependencies grunt-cli 构建 $ npm install --dev$ grunt

  • Semantic UI—完全语义化的前端界面开发框架,跟 Bootstrap 和 Foundation 比起来,还是有些不同的,在功能特性上、布局设计上、用户体验上均存在很多差异。 Semantic UI 特点: 文档和演示非常完善 易于学习和使用 配备网格布局 支持 Sass 和 LESS 动态样式语言 有一些非常实用的附加配置,例如inverted类。 对于社区贡献来说是比较开放的。 有一个非

  • Semantic Kernel 是一种轻量级 SDK,可将 AI 大语言模型 (LLM) 与传统编程语言集成。 Semantic Kernel 可扩展编程模型结合了自然语言语义功能、传统代码原生功能和基于嵌入的内存,释放新的潜力并通过 AI 为应用程序增加价值。 Semantic Kernel 旨在支持和封装来自最新 AI 研究的多种设计模式,以便开发人员可以为他们的应用程序注入复杂的技能,如提示

  • 基于 angular-style 风格的更新日志生成器,效果演示: https://github.com/ymind/maven-semantic-gitlog/blob/master/CHANGELOG.md 主要特性: 基于 Semantic Versioning 的版本推断器 完全基于 Mustache 模板引擎 本地化支持(实例) 多模板多输出支持