markdown 我对Git提交结构的看法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 我对Git提交结构的看法相关的知识,希望对你有一定的参考价值。

# Git commit prefixes

When possible it is preferable to break up your commits into smaller digestable chunks
so that they are more readable during the peer review process. One way to accomplish this 
is by using a known set of `git` commit prefixes.

- `[api]`: New apis / changes to apis
- `[test]`: Update test/* files
- `[dist]`: Changes to submodules, version bumps, updates to package.json
- `[tiny]`: Small changes#
- `[doc]`: Updates to documentation
- `[ux]`: Updates to UX
- `[fix]`: Bug fixes
- `[bin]`: Update binary scripts associated with the project
- `[merge]`: Resolved git merge from upstream or otherwise
- `[refactor]`: Refactor of existing code with no external API changes
- `[{{ feature }}]`: Updates {{ feature }}

For example if you had done work on a new API for your project and added tests your commit
would look something like this:

``` sh
git add some-file.js
git add test/some-file.test.js
git commit -m '[api test] Added some feature along with associated tests.'
```

以上是关于markdown 我对Git提交结构的看法的主要内容,如果未能解决你的问题,请参考以下文章

markdown git:为提交添加长描述

markdown Git提交消息规范

markdown 自上次发布以来Git提交

markdown git commit提交规范

markdown AngularJS Git提交消息约定

markdown 显示在特定git提交中更改的文件