Git 工作流

本贴最后更新于 2194 天前,其中的信息可能已经事过境迁

整体流程

  1. 在自己分支做开发
  2. 提交到远程仓库
  3. dev 分支发起 PULL REQUEST
  4. 代码审核
  5. 合并请求到 dev 分支

Git Log 提交前缀

选择合适的 emoji 表情:http://gitmoji.surge.sh

Git 操作流程

克隆 dev 分支代码

git clone -b dev https://github.com/lets-blade/blade.git

开发新特性

git checkout -b feature/thread_pool_config

git push -u origin feature/thread_pool_config

commit example:

git commit -m "✨ Support easy to create asynchronous tasks (#172)"

修复 BUG

git checkout -b fixbug/171

git push -u origin fixbug/171

commit example:

git commit -m "🐛 fixed (#171)"

or

git commit -m "🚑 fixed (#171)"

单元测试

git checkout -b unittest/blade_start

git push -u origin unittest/blade_start

commit example:

git commit -m ":white_check_mark: Add test code for the Blade.start"

代码优化

这里有性能优化、代码结构改善、API 起名、代码注释

git checkout -b improve/blade_comment

git push -u origin improve/blade_comment

commit example:

git commit -m "💬 Add a comment for the Blade class"


git checkout -b improve/route_match

git push -u origin improve/route_match

commit example:

git commit -m "⚡️ Improve route matching performance"

修复拼写错误

git checkout -b feature/thread_pool_config

git push -u origin feature/thread_pool_config

commit example:

git commit -m "✏️ fixed spelling mistakes"

Github Issue 关联

close #n

closes #n

closed #n

fix #n

fixes #n

fixed #n

resolve #n

resolves #n

resolved #n


参考资料:

  • Git

    Git 是 Linux Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。

    205 引用 • 357 回帖

相关帖子

回帖

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...