Skip to content

Commit a4d800a

Browse files
committed
docs: update 7.5 exercise section
1 parent 5c207cb commit a4d800a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/en/lecture07/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Finally, `<footer>` is optional and generally involves breaking changes, depreca
6262

6363
Standardized commit messages can be parsed by tools to automatically generate documentation or release logs. In some large open-source projects, manually organizing version update documentation, interface updates, and compatibility impacts is very time-consuming and labor-intensive. Using a unified standard can greatly automate this work. Of course, different projects have different requirements and format standards for commit messages, and open-source projects or company projects also have different requirements for commit messages. Generally, you need to follow the conventions of the project you're working on. More mature open-source projects can usually be found in the `README` documentation on how to contribute, or have a separate `CONTRIBUTING.md` document that specifies code style, commit methods, etc.
6464

65-
### 7.1.1 Automated Validation of `commit message`
65+
### 7.1.1 Automated Validation of `commit message` {#711-automated-validation-of-commit-message}
6666

6767
With commit message conventions in place, how do we ensure developers follow them? We can use Git's `Git Hooks` feature to validate commit messages. This article won't go into too much detail about `Git Hooks`, only providing basic explanations. For specific details, refer to the [official documentation](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) or [Atlassian's documentation](https://www.atlassian.com/git/tutorials/git-hooks).
6868

@@ -265,4 +265,4 @@ fixup d9a9d7f04 feat: some feature third commit
265265

266266
## 7.5 Exercise
267267

268-
Based on the [7.1.1 Automated Validation of commit message](https://github.com/datawhalechina/faster-git/blob/main/lecture07/README.md#711-%E8%87%AA%E5%8A%A8%E5%8C%96%E6%A0%A1%E9%AA%8Ccommit-message) solution in the course, implement the `git-hook` for the commit message specification in [README.md](https://github.com/datawhalechina/faster-git/blob/main/README.md#commit-message).
268+
Based on the [7.1.1 Automated Validation of commit message](#711-automated-validation-of-commit-message) solution in the course, implement the `git-hook` for the commit message specification in [README.md](https://github.com/datawhalechina/faster-git/blob/main/README.md#commit-message).

docs/zh/lecture07/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Git 是目前程序员必备基础技能,可以用来管理代码、文档、
8484

8585
或者有单独的 `CONTRIBUTING.md` 文档,对代码风格、提交方式等进行约定。
8686

87-
### 7.1.1 自动化校验 `commit message`
87+
### 7.1.1 自动化校验 `commit message` {#711-自动化校验-commit-message-方案}
8888

8989
有了提交信息的规范,如何确保开发者对规范进行遵守呢?我们可以使用 Git 提供的 `Git Hooks` 功能对提交
9090

@@ -323,6 +323,6 @@ fixup d9a9d7f04 feat: some feature third commit
323323

324324
## 7.5 Exercise
325325

326-
基于课程中[7.1.1 自动化校验commit message](https://github.com/datawhalechina/faster-git/blob/main/lecture07/README.md#711-%E8%87%AA%E5%8A%A8%E5%8C%96%E6%A0%A1%E9%AA%8Ccommit-message)方案
326+
基于课程中[7.1.1 自动化校验commit message方案](#711-自动化校验-commit-message-方案)
327327
实现[README.md](https://github.com/datawhalechina/faster-git/blob/main/README.md#commit-message)
328328
中提交信息规范的`git-hook`的实现。

0 commit comments

Comments
 (0)