This article shares a small plug-in for submitting specifications that is easy and useful to install.

The plugin is introduced

As a programmer, committing code is something we do many times a day. I wonder if your team has a git commit specification. If so, the plug-in shared today will be particularly useful; If not, then hopefully reading this article will help you form submission specifications.

As the saying goes: no rules, no fangyuan. This sentence is also applicable in our daily development work. There are written submission specifications, which can not only facilitate code review in the later stage, but also quickly locate a submission according to the submitted log when there is a problem with the code, and even parse the submitted message, automatically close bugs and automatically send emails. There’s a lot more that can be done to improve efficiency based on business needs, so we need to get git commit specifications right.

To understand why we are making this specification, let’s take a look at the convenience of the plugin shared in this article.

The first step:

The second step:

Step 3:

Support field

  • Feat: New Feature
  • -Dan: I’m going to fix the problem
  • Docs: Updates documents
  • Refactor: refactoring (i.e. code changes that are not new features or bug fixes)
  • Build: Builds compile-related changes
  • Chore: Bump Version to [Version Number]
  • Test: Adds a test
  • Style: Format changes (changes that do not affect code execution)

In fact, this is a written submission specification, the above support these fields, and basically meet most of our daily development of submission code.

Installation and use

The installation conditions

  • node
  • npm

Installation method

> npm i safecommit -g
Copy the code

Method of use

  1. In git
  2. git add
  3. Git sc = git sc = git sc
  4. Enter the commit content
  5. Fill in the updated file or press Enter
  6. And then finally push

Note: If you’re comfortable with GUI tools like SourceTree, use Git SC for at least the first time in your project, and everything thereafter can be done in your GUI tools.

This “note” is official, but I don’t know if there is any restriction on SourceTree version, or if I open it in the wrong way. Let me know if you can use it in SourceTree

The literature

www.npmjs.com/package/saf…