Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 1.89 KB

git-style.md

File metadata and controls

65 lines (50 loc) · 1.89 KB

Git 风格

  • 基于 IntelliJ IDEA / WebStorm
  • 只有当 IDE 完成不了的功能才可以使用命令行

Git 仓库项目名

  • 复词使用中划线隔开,例如:tkey-demo

版本号

  • 采用:Semantic Versioning(简称 SemVer)
  • 总格式:v1.1.0 = 主版本号.小版本.修订号
  • 主版本号:不考虑向下兼容,开发新特性
  • 小版本:考虑向下兼容,开发新特性
  • 修订号:考虑向下兼容,修复bug

场景修饰

  • 里程碑(milestone):v1.1.0.M1
  • 预览版(release candidate):v1.1.0.RC1
  • 正式版(release):v1.1.0.RELEASE

Git 命名

build: Changes that affect the build system or external dependencies (example scopes: maven, gradle, gulp, broccoli, npm)
ci: Changes to our CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)
docs: Documentation only changes
feat: A new feature
fix: A bug fix
perf: A code change that improves performance
refactor: A code change that neither fixes a bug nor adds a feature
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
test: Adding missing tests or correcting existing tests
  • 每改一个独立功能 commit 一次,别写了一堆功能再一次 commit,到时候做提交的代码检查会死人
  • 比如:
docs: 更新 Git 规范
feat: 新增简化模式

Gitflow 工作流