forked from liuyuchao/runner-test
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
c6791cbf8f | |||
2a7b341efc | |||
66f3671e5e | |||
9b8d666d3a | |||
67e7a66b26 | |||
a328d11fe8 |
BIN
20241128本部嵌入式持续集成调研纪要.docx
Normal file
BIN
20241128本部嵌入式持续集成调研纪要.docx
Normal file
Binary file not shown.
299
testpr
Normal file
299
testpr
Normal file
@ -0,0 +1,299 @@
|
||||
|
||||
已经变得迟钝,好久没有开启一个全新的学习模式了?
|
||||
ai agent and so on
|
||||
|
||||
|
||||
|
||||
|
||||
测试初始化,同时测试更新设置仓库。
|
||||
|
||||
vvmerge
|
||||
pulls_default_merge_style
|
||||
|
||||
|
||||
3. 为什么必须加 return?
|
||||
ctx.Error() 仅负责 “写入响应”,不负责 “终止函数”。为了确保错误响应被客户端正确接收,必须用 return 终止后续代码执行,避免响应被覆盖。
|
||||
|
||||
|
||||
2. 无需 return 的原因:函数自然结束
|
||||
若 ctx.Status() 是函数的最后一行代码,执行后函数会自然结束(退出),不会有后续代码覆盖响应。
|
||||
示例中,ctx.Status(http.StatusNoContent) 之后没有其他响应相关代码,因此无需 return。
|
||||
|
||||
如果考虑到结束与否,需要考虑加还是不加。
|
||||
|
||||
#哪些值得推荐得开源项目:
|
||||
1. https://github.com/jwasham/coding-interview-university
|
||||
2. https://github.com/trimstray/the-book-of-secret-knowledge.git
|
||||
3. # GitHub stars > 100K 项目(按 stars 倒序,部分列举)
|
||||
|
||||
| 项目名 | stars | 链接 |
|
||||
|---|---|---|
|
||||
| freeCodeCamp | 423,229 | [freeCodeCamp](https://github.com/freeCodeCamp/freeCodeCamp) |
|
||||
| build-your-own-x | 400,942 | [build-your-own-x](https://github.com/codecrafters-io/build-your-own-x) |
|
||||
| awesome | 382,745 | [awesome](https://github.com/sindresorhus/awesome) |
|
||||
| free-programming-books | 363,058 | [free-programming-books](https://github.com/EbookFoundation/free-programming-books) |
|
||||
| public-apis | 356,647 | [public-apis](https://github.com/public-apis/public-apis) |
|
||||
| developer-roadmap | 331,538 | [developer-roadmap](https://github.com/kamranahmedse/developer-roadmap) |
|
||||
| coding-interview-university | 322,843 | [coding-interview-university](https://github.com/jwasham/coding-interview-university) |
|
||||
| system-design-primer | 311,425 | [system-design-primer](https://github.com/donnemartin/system-design-primer) |
|
||||
| 996.ICU | 273,605 | [996.ICU](https://github.com/996icu/996.ICU) |
|
||||
| awesome-python | 250,541 | [awesome-python](https://github.com/vinta/awesome-python) |
|
||||
| react | 237,349 | [react](https://github.com/facebook/react) |
|
||||
| awesome-selfhosted | 236,726 | [awesome-selfhosted](https://github.com/awesome-selfhosted/awesome-selfhosted) |
|
||||
| project-based-learning | 235,537 | [project-based-learning](https://github.com/practical-tutorials/project-based-learning) |
|
||||
| vue | 209,158 | [vue](https://github.com/vuejs/vue) |
|
||||
| Python | 202,942 | [Python](https://github.com/TheAlgorithms/Python) |
|
||||
| linux | 197,766 | [linux](https://github.com/torvalds/linux) |
|
||||
| javascript-algorithms | 192,191 | [javascript-algorithms](https://github.com/trekhleb/javascript-algorithms) |
|
||||
| tensorflow | 190,768 | [tensorflow](https://github.com/tensorflow/tensorflow) |
|
||||
| computer-science | 188,318 | [computer-science](https://github.com/ossu/computer-science) |
|
||||
| You-Dont-Know-JS | 182,679 | [You-Dont-Know-JS](https://github.com/getify/You-Dont-Know-JS) |
|
||||
| CS-Notes | 181,006 | [CS-Notes](https://github.com/CyC2018/CS-Notes) |
|
||||
| ohmyzsh | 180,013 | [ohmyzsh](https://github.com/ohmyzsh/ohmyzsh) |
|
||||
| the-book-of-secret-knowledge | 178,381 | [the-book-of-secret-knowledge](https://github.com/trimstray/the-book-of-secret-knowledge) |
|
||||
| AutoGPT | 176,971 | [AutoGPT](https://github.com/Significant-Gravitas/AutoGPT) |
|
||||
| vscode | 174,622 | [vscode](https://github.com/microsoft/vscode) |
|
||||
| bootstrap | 172,528 | [bootstrap](https://github.com/twbs/bootstrap) |
|
||||
| flutter | 171,430 | [flutter](https://github.com/flutter/flutter) |
|
||||
| Python-100-Days | 169,324 | [Python-100-Days](https://github.com/jackfrued/Python-100-Days) |
|
||||
| gitignore | 168,040 | [gitignore](https://github.com/github/gitignore) |
|
||||
| the-art-of-command-line | 157,094 | [the-art-of-command-line](https://github.com/jlevy/the-art-of-command-line) |
|
||||
| stable-diffusion-webui | 154,566 | [stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) |
|
||||
| JavaGuide | 150,840 | [JavaGuide](https://github.com/Snailclimb/JavaGuide) |
|
||||
| awesome-go | 147,525 | [awesome-go](https://github.com/avelino/awesome-go) |
|
||||
| javascript | 147,076 | [javascript](https://github.com/airbnb/javascript) |
|
||||
| transformers | 147,050 | [transformers](https://github.com/huggingface/transformers) |
|
||||
| ollama | 146,725 | [ollama](https://github.com/ollama/ollama) |
|
||||
| Microsoft-Activation-Scripts | 141,689 | [Microsoft-Activation-Scripts](https://github.com/massgravel/Microsoft-Activation-Scripts) |
|
||||
| youtube-dl | 136,519 | [youtube-dl](https://github.com/ytdl-org/youtube-dl) |
|
||||
| next.js | 133,226 | [next.js](https://github.com/vercel/next.js) |
|
||||
| awesome-chatgpt-prompts | 130,747 | [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts) |
|
||||
| go | 128,919 | [go](https://github.com/golang/go) |
|
||||
| fucking-algorithm | 128,585 | [fucking-algorithm](https://github.com/labuladong/fucking-algorithm) |
|
||||
| tech-interview-handbook | 127,679 | [tech-interview-handbook](https://github.com/yangshun/tech-interview-handbook) |
|
||||
| scrcpy | 125,194 | [scrcpy](https://github.com/Genymobile/scrcpy) |
|
||||
| 30-seconds-of-code | 124,585 | [30-seconds-of-code](https://github.com/Chalarangelo/30-seconds-of-code) |
|
||||
| react-native | 123,055 | [react-native](https://github.com/facebook/react-native) |
|
||||
| HelloGitHub | 121,740 | [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) |
|
||||
| PowerToys | 120,925 | [PowerToys](https://github.com/microsoft/PowerToys) |
|
||||
| n8n | 119,094 | [n8n](https://github.com/n8n-io/n8n) |
|
||||
| yt-dlp | 119,075 | [yt-dlp](https://github.com/yt-dlp/yt-dlp) |
|
||||
| electron | 117,482 | [electron](https://github.com/electron/electron) |
|
||||
| kubernetes | 116,356 | [kubernetes](https://github.com/kubernetes/kubernetes) |
|
||||
| free-programming-books-zh_CN | 114,666 | [free-programming-books-zh_CN](https://github.com/justjavac/free-programming-books-zh_CN) |
|
||||
| hello-algo | 114,417 | [hello-algo](https://github.com/krahets/hello-algo) |
|
||||
| node | 112,219 | [node](https://github.com/nodejs/node) |
|
||||
| langchain | 111,629 | [langchain](https://github.com/langchain-ai/langchain) |
|
||||
| d3 | 111,063 | [d3](https://github.com/d3/d3) |
|
||||
| three.js | 107,650 | [three.js](https://github.com/mrdoob/three.js) |
|
||||
| dify | 107,304 | [dify](https://github.com/langgenius/dify) |
|
||||
| axios | 107,228 | [axios](https://github.com/axios/axios) |
|
||||
| free-for-dev | 106,015 | [free-for-dev](https://github.com/ripienaar/free-for-dev) |
|
||||
| TypeScript | 105,262 | [TypeScript](https://github.com/microsoft/TypeScript) |
|
||||
| rust | 105,089 | [rust](https://github.com/rust-lang/rust) |
|
||||
| excalidraw | 103,686 | [excalidraw](https://github.com/excalidraw/excalidraw) |
|
||||
| deno | 103,601 | [deno](https://github.com/denoland/deno) |
|
||||
| nodebestpractices | 103,388 | [nodebestpractices](https://github.com/goldbergyoni/nodebestpractices) |
|
||||
| create-react-app | 103,364 | [create-react-app](https://github.com/facebook/create-react-app) |
|
||||
| open-webui | 102,874 | [open-webui](https://github.com/open-webui/open-webui) |
|
||||
| GitHub-Chinese-Top-Charts | 100,339 | [GitHub-Chinese-Top-Charts](https://github.com/GrowingGit/GitHub-Chinese-Top-Charts) |
|
||||
|
||||
> 统计时间:2025-07-17
|
||||
|
||||
# GitHub forks > 50K 项目(按 forks 倒序,部分列举)
|
||||
|
||||
| 项目名 | forks | stars | 链接 |
|
||||
|---|---|---|---|
|
||||
| datasharing | 243,623 | 6,620 | [datasharing](https://github.com/jtleek/datasharing) |
|
||||
| Spoon-Knife | 152,208 | 13,104 | [Spoon-Knife](https://github.com/octocat/Spoon-Knife) |
|
||||
| ProgrammingAssignment2 | 144,008 | 857 | [ProgrammingAssignment2](https://github.com/rdpeng/ProgrammingAssignment2) |
|
||||
| SmartThingsPublic | 89,042 | 2,607 | [SmartThingsPublic](https://github.com/SmartThingsCommunity/SmartThingsPublic) |
|
||||
| first-contributions | 88,431 | 49,385 | [first-contributions](https://github.com/firstcontributions/first-contributions) |
|
||||
| Complete-Python-3-Bootcamp | 87,015 | 28,657 | [Complete-Python-3-Bootcamp](https://github.com/Pierian-Data/Complete-Python-3-Bootcamp) |
|
||||
| gitignore | 83,058 | 168,040 | [gitignore](https://github.com/github/gitignore) |
|
||||
| css-exercises | 81,817 | 1,889 | [css-exercises](https://github.com/TheOdinProject/css-exercises) |
|
||||
| coding-interview-university | 79,614 | 322,843 | [coding-interview-university](https://github.com/jwasham/coding-interview-university) |
|
||||
| bootstrap | 79,106 | 172,528 | [bootstrap](https://github.com/twbs/bootstrap) |
|
||||
| freeCodeCamp | 36,698 | 423,229 | [freeCodeCamp](https://github.com/freeCodeCamp/freeCodeCamp) |
|
||||
| tensorflow | 28,836 | 190,768 | [tensorflow](https://github.com/tensorflow/tensorflow) |
|
||||
| vue | 34,690 | 209,158 | [vue](https://github.com/vuejs/vue) |
|
||||
| react | 44,343 | 237,349 | [react](https://github.com/facebook/react) |
|
||||
| awesome | 45,134 | 382,745 | [awesome](https://github.com/sindresorhus/awesome) |
|
||||
|
||||
> 统计时间:2025-07-17
|
||||
> 仅部分项目 forks 超过 50K,实际数量有限。
|
||||
> 如需查看更多结果,可访问 [GitHub forks 排序搜索](https://github.com/search?q=forks:%3E50000&sort=forks&order=desc)。
|
||||
> 统计时间:2025-07-17
|
||||
> 目前只有少数项目 forks 超过 100K,其他大多数项目未达到该数量级。
|
||||
> 如需查看更多结果,可访问 [GitHub forks 排序搜索](https://github.com/search?q=forks:%3E100000&sort=forks&order=desc)。
|
||||
|
||||
使用 git rm --cached 只会从索引中移除文件,而不会删除工作目录中的文件,这样你仍然可以在本地使用它。
|
||||
一旦文件被移除并提交后,根据 .gitignore 文件中的规则,该文件将被忽略,今后不会被包含在版本控制中
|
||||
|
||||
https://git-scm.com/book/en/v2
|
||||
|
||||
|
||||
有时间看完所有得基础命令使用和对应得协议的学习
|
||||
|
||||
四种协议的问题:
|
||||
|
||||
还是没有明白通过git协议的案例,比如我clone github上面显示了 https/http 和ssh 协议,文件系统协议分享也理解,但是还有什么场景是git协议直接使用的说得不够明白?
|
||||
|
||||
|
||||
安全性:
|
||||
|
||||
SSH提供加密和身份验证,适合处理敏感信息。
|
||||
Git协议只用于开放访问,避免敏感数据
|
||||
|
||||
|
||||
### 以下是一些使用Git协议的公共开源项目的案例,您可以用来验证和测试:
|
||||
|
||||
### 公共镜像项目示例
|
||||
|
||||
1. **Linux内核**
|
||||
- **克隆命令**:
|
||||
```bash
|
||||
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
|
||||
```
|
||||
- **验证**:访问[Linux内核Git仓库](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git)。
|
||||
|
||||
使用了SSH协议的对比:
|
||||
命令 git clone git@github.com:github/gitignore.git 使用的是 SSH协议。以下是原因和相关解释:
|
||||
|
||||
2. **GNU项目**
|
||||
- **克隆命令**:
|
||||
```bash
|
||||
git clone git://git.savannah.gnu.org/emacs.git
|
||||
```
|
||||
- **验证**:访问[GNU Emacs Git仓库](https://git.savannah.gnu.org/git/emacs.git)。
|
||||
|
||||

|
||||
3. **Git本身**
|
||||
- **克隆命令**:
|
||||
```bash
|
||||
git clone git://git.kernel.org/pub/scm/git/git.git
|
||||
```
|
||||
- **验证**:访问[Git源代码仓库](https://git.kernel.org/pub/scm/git/git.git)。
|
||||
|
||||
### 使用Git协议的特点
|
||||
|
||||
- **无身份验证**:通过`git://`协议,不需要输入用户名或密码。
|
||||
- **快速克隆**:适合快速获取公共开源项目,能够提高开发者的提取效率。
|
||||
|
||||
### 注意事项
|
||||
|
||||
使用Git协议时,请注意该协议不提供安全性。它主要用于开放和公共项目,因此,敏感信息或需要权限控制的项目应使用SSH或HTTPS协议进行访问。
|
||||
|
||||
|
||||
git和ssh的协议本身如何学习了解以及对比为什么ssh,可以支持安全性,git协议无法做到
|
||||
|
||||
|
||||
对于开发者来说,规范且清晰的 `git commit` 提示和 `push` 内容介绍能极大提升团队协作效率和代码维护性。以下从规范指南、工具推荐和开源项目示例三个方面展开,帮助你更好地实践。
|
||||
|
||||
|
||||
### 一、`git commit` 提示与 `push` 内容的规范指南
|
||||
|
||||
https://www.conventionalcommits.org/en/v1.0.0/#specification
|
||||
|
||||
|
||||
#### 1. `git commit` 提示的核心原则
|
||||
- **结构化**:遵循固定格式(如类型+范围+描述),方便自动化工具解析和历史检索。
|
||||
- **简洁明确**:标题通常不超过50字符,正文补充细节(如动机、解决的问题、与其他修改的关联)。
|
||||
- **语义化**:通过动词和类型区分修改性质(如新增功能、修复bug、重构代码)。
|
||||
|
||||
常见的规范格式(以 [Conventional Commits](https://www.conventionalcommits.org/) 为例:
|
||||
```
|
||||
<类型>[可选 范围]: <描述>
|
||||
|
||||
[可选 正文]
|
||||
|
||||
[可选 脚注]
|
||||
```
|
||||
- **类型**:`feat`(新功能)、`fix`(bug修复)、`docs`(文档)、`style`(格式调整,不影响代码逻辑)、`refactor`(重构)、`test`(测试相关)、`chore`(构建/依赖等杂项)。
|
||||
- **范围**:可选,说明修改涉及的模块(如 `auth`、`api`)。
|
||||
- **描述**:简洁描述修改内容,使用祈使句(如“添加用户登录验证”而非“添加了用户登录验证”)。
|
||||
|
||||
示例:
|
||||
```
|
||||
feat(auth): 实现手机号验证码登录功能
|
||||
|
||||
- 新增验证码发送接口
|
||||
- 完善登录状态存储逻辑
|
||||
- 修复验证码过期时间计算错误
|
||||
|
||||
Closes #123
|
||||
```
|
||||
|
||||
#### 2. `git push` 内容介绍的注意事项
|
||||
`push` 通常是将本地提交推送到远程仓库(如PR/MR描述),内容应:
|
||||
- 关联相关提交:汇总本次推送包含的关键 `commit` 信息(可通过 `git log` 简洁提炼)。
|
||||
- 说明上下文:如“本次推送包含3个提交,主要解决了XX模块的性能问题,具体见各commit详情”。
|
||||
- 关联任务/Issue:通过关键词(如 `Fixes #456`)关联项目管理工具中的任务,自动触发状态更新。
|
||||
|
||||
|
||||
### 二、辅助工具推荐
|
||||
#### 1. 规范 `commit` 提示的工具
|
||||
- **commitizen**:交互式命令行工具,引导你按规范填写 `commit` 信息,支持自定义配置。
|
||||
仓库:[commitizen/cz-cli](https://github.com/commitizen/cz-cli)
|
||||
使用:安装后用 `git cz` 替代 `git commit`,按提示选择类型、输入描述等。
|
||||
|
||||
- **commitlint**:校验 `commit` 信息是否符合规范,可集成到 `git hook` 中(如配合 `husky`),避免不规范提交。
|
||||
仓库:[conventional-changelog/commitlint](https://github.com/conventional-changelog/commitlint)
|
||||
|
||||
- **husky**:管理 `git hook` 的工具,可在 `commit-msg` 阶段自动调用 `commitlint` 校验,在 `pre-commit` 阶段执行代码格式化/ lint 等。
|
||||
仓库:[typicode/husky](https://github.com/typicode/husky)
|
||||
|
||||
#### 2. 自动生成 `commit` 日志的工具
|
||||
- **standard-version**:根据 `Conventional Commits` 自动生成CHANGELOG、更新版本号,适合语义化版本(SemVer)管理。
|
||||
仓库:[conventional-changelog/standard-version](https://github.com/conventional-changelog/standard-version)
|
||||
|
||||
- **release-please**:Google 开源的自动发布工具,基于 `commit` 信息生成PR,自动更新版本和CHANGELOG。
|
||||
仓库:[googleapis/release-please](https://github.com/googleapis/release-please)
|
||||
|
||||
|
||||
### 三、遵循规范的开源项目示例(可参考其 `commit` 历史)
|
||||
以下项目的 `commit` 信息和PR描述堪称典范,可直接查看其 `git log` 或PR列表学习:
|
||||
|
||||
1. **Vue.js**
|
||||
仓库:[vuejs/vue](https://github.com/vuejs/vue)
|
||||
特点:严格遵循语义化提交,类型清晰(如 `fix(compiler)`、`feat(reactivity)`),正文补充修改细节。
|
||||
|
||||
2. **React**
|
||||
仓库:[facebook/react](https://github.com/facebook/react)
|
||||
特点:提交信息简洁且关联Issue,PR描述详细(包含测试步骤、实现思路)。
|
||||
|
||||
3. **TypeScript**
|
||||
仓库:[microsoft/TypeScript](https://github.com/microsoft/TypeScript)
|
||||
特点:类型明确(如 `refactor`、`test`),脚注常用 `Fixes #xxx` 关联问题。
|
||||
|
||||
4. **Angular**
|
||||
仓库:[angular/angular](https://github.com/angular/angular)
|
||||
特点:早期推广 `Conventional Commits` 的代表项目,规范极其严格,包含范围和详细正文。
|
||||
|
||||
5. **Vite**
|
||||
仓库:[vitejs/vite](https://github.com/vitejs/vite)
|
||||
特点:提交信息简洁有力,PR描述会汇总关联的 `commit` 并说明影响。
|
||||
|
||||
6. **ESLint**
|
||||
仓库:[eslint/eslint](https://github.com/eslint/eslint)
|
||||
特点:commit类型细分(如 `docs: update README`、`chore: upgrade dependencies`),PR关联Issue并说明解决方案。
|
||||
|
||||
7. **Docker**
|
||||
仓库:[docker/docker](https://github.com/docker/docker)
|
||||
特点:提交描述侧重“做了什么”和“为什么做”,PR包含测试用例和兼容性说明。
|
||||
|
||||
|
||||
### 四、总结
|
||||
- 从规范入手:优先采用 `Conventional Commits` 等成熟标准,确保团队统一。
|
||||
- 工具提效:用 `commitizen` 降低手动编写成本,用 `commitlint + husky` 强制规范,用 `standard-version` 自动生成日志。
|
||||
- 参考优秀项目:通过阅读开源项目的 `commit` 历史和PR描述,模仿其简洁、清晰、结构化的表达方式。
|
||||
|
||||
通过这些方法,既能提升自己的代码管理习惯,也能让团队协作更顺畅。
|
||||
|
||||
Closes #123 是 Git 协作中(尤其在 GitHub、GitLab 等平台)用于关联并自动关闭 Issue的关键字语法,其中 #123 对应的是Issue 编号,而非 PR 编号
|
||||
|
||||
做开源和内部项目的bug管理系统的完整体验。代码管理方便了开发者,禅道类似工具方便了项目经理是吧?
|
||||
|
||||
Closes #123 是 “告诉平台:当 PR 合并后,自动关闭 Issue #123”,操作主体是平台;
|
||||
开发者始终可以手动关闭 / 开启 Issue,两种方式并不冲突(例如:如果 Issue 无需代码变更即可解决,直接手动关闭更高效)
|
||||
|
Loading…
x
Reference in New Issue
Block a user