UNPKG

@gaiot/apis

Version:

aiot apis

74 lines (46 loc) 2.09 kB
git 使用文档 | [组件库使用文档](./README.lib.md) ## 模板工程使用: ### 模板代码拉取与安装 `git clone https://geek.glodon.com/scm/gos/aiot-standard-frontend.git`,克隆代码。 `yarn install`,安装项目所有依赖。 yarn 安装可参考:https://blog.csdn.net/qq_45112637/article/details/125543953 `yarn start`,运行模板项目。 ### 贡献代码 `git switch master`,切换分支 master。 `git pull`,获取 master 最新代码。 `git switch –c feature/xxx`,在 master 分支下创建并切换到新分支 feature/xxx。 在新分支编写代码。 `git add .`,把所有文件修改添加到暂存区。 `git commit -m "备注信息"`,将暂存区内容添加到本地仓库。 `git push`,把本地仓库的更新推到远程仓库。 分支代码完成后提 PR,将分支`feature/xxx`merge 到 develop 分支。 - 若有冲突,`git switch feature/xxx`切换到该分支,然后`git pull origin develop`,手动解决冲突之后再次提交代码。 - 没有冲突且测试没有问题,再提 PR,将 develop 分支 merge 到 master 分支。 ### 更换远程仓库 **可向自己的代码仓库提交代码,不要在模板项目上提交代码哦~** 关联远程库例子:`git remote add origin git@server-name:path/repo-name.git`,可参考https://www.liaoxuefeng.com/wiki/896043488029600/898732864121440。 `git add .`,把所有文件修改添加到暂存区。 `git commit -m "备注信息"`,将暂存区内容添加到本地仓库。 `git push`,把本地仓库的更新推到远程仓库。 ## 代码提交规范: [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional) ``` { 'build': 打包 'chore': 性能, 'ci': 脚手架/工程化, 'docs': 文档, 'feat' : 新功能, 'fix': 修改bug, 'perf': 性能优化, 'refactor': 重构, 'revert': 回退, 'style': 样式, 'test': 单元测试 } ``` 举个例子 ``` git commit -m "fix: some bug" git commit -m "feat: some feautre" ```