Skip to content

Commit b828a03

Browse files
committed
address review comments
- Pick pull --rebase among three options - Update guideline of resolving conflicts
1 parent 6b5b787 commit b828a03

File tree

1 file changed

+15
-24
lines changed

1 file changed

+15
-24
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
- branch:分支
66
- commit:提交记录
77
- merge:指 PR 合并到代码仓库的操作
8-
- conflicts:合并冲突
8+
- conflicts:(合并)冲突
99

1010
## 开始之前
11-
1. 首先,fork 一下 [challenges](https://github.com/FreeCodeCampChina/challenges/pulls) repo
11+
1. 首先,fork 一下 [challenges](https://github.com/FreeCodeCampChina/challenges.git) repo
1212
2.**你的 fork** 克隆到本地。注意,`your_name` 是你的 github ID:
1313
```bash
1414
git clone https://github.com/your_name/challenges.git
@@ -43,40 +43,31 @@ git push origin your_branch_name
4343
9. 打开 github 页面,创建 PR
4444

4545
## 同步远程更新至本地
46-
1. 关联上游 repo 至本地项目。注意,`upstream` 只是一个本地的 reference,你可以根据自己的习惯命名
46+
1. 关联上游 repo 至本地项目:
4747
```bash
4848
git remote add upstream https://github.com/FreeCodeCampChina/challenges.git
4949
```
50-
2. 获取上游更新,并应用到本地。以下提供三种方式:
51-
1. 使用 pull 命令:
52-
```bash
53-
git pull upstream translate
54-
```
55-
2. 使用 rebase 命令:
56-
```bash
57-
git fetch upstream
58-
git rebase upstream/translate
59-
```
60-
3. 使用 pull 命令与 rebase flag(推荐):
61-
```bash
62-
git pull --rebase upstream translate
63-
```
50+
2. 获取上游更新,并应用到本地:
51+
```bash
52+
git pull --rebase upstream translate
53+
```
6454

6555
## 注意
66-
1. `pull``rebase` 之后,如果有 conflicts,可以先使用 `git status` 查看存在 conflicts 的文件。修改成需要的版本后:
67-
- 如果你使用了 `pull` 命令,你需要 `git add .` 然后 `git commit`
68-
- 如果你使用了 `rebase``pull --rebase` 命令,你需要 `git add .` 然后 `git rebase --continue`
56+
1. `pull``rebase` 之后,如果有 conflicts,可以先使用 `git status` 查看存在 conflicts 的文件。修改成需要的版本后,使用 `git add .` 然后 `git rebase --continue`
6957
2. 解决冲突之后,需要更新至远程,否则只有你的本地有更新:
7058
```bash
7159
git push origin your_branch_name
7260
```
73-
3. 如果出现错误提示(多出现于 `rebase``pull` 命令),请先使用 `git status` 命令检查本地是否有未解决完成的 conflicts
74-
4. 如果你已经用当前的 branch 开了 PR,那么更新这个 branch 至远程的同时,你的 PR 也会自动更新
61+
3. 如果出现错误提示,请先使用 `git status` 命令检查本地是否有未解决完成的 conflicts
62+
3. 任何时候出现错误,不必惊慌。先使用 `git status` 命令检查当前所在的分支、当前目录是否纯净(clean),以及本地是否有未解决完成的 conflicts
63+
4. 如果上一步没问题,你可以用 `git push -f origin your_branch_name` 来更新远程
64+
5. 如果你已经用当前的 branch 开了 PR,那么更新这个 branch 至远程的同时,你的 PR 也会自动更新
7565

7666
## 一些原则
77-
1. 建议使用 [git workflow](https://guides.github.com/introduction/flow/) 来进行分支的管理。这样我们可以提交 PR 之后继续在新的 branch 上进行后续的翻译。若需要更新当前的 PR,任何时候我们都可以切换回来
67+
1. 建议使用 [git workflow](https://guides.github.com/introduction/flow/) 来进行分支的管理。这样我们可以提交 PR 之后继续在新的 branch 上进行后续的翻译。若需要更新当前的 PR,我们随时可以切换回来
7868
2. 不建议同时开两个相同类型(比如翻译)的 PR,请等待之前的 merge 之后再开新的 PR
79-
3. 更新(创建)PR 时,请更新 labels,方便管理
69+
3. 如果你的 PR 已经被 review 过,请不要再添加新的翻译内容,根据 comment 修改好当前的 PR 即可。后续的翻译你可以等当前翻译 merge 后再开始做,或者在另一个本地的 branch 进行后续的翻译
70+
4. 更新(创建)PR 时,请更新 labels,方便管理
8071

8172
## 标签(labels)
8273
1. `ready for review`:新开 PR 的默认状态,请手动添加此标签

0 commit comments

Comments
 (0)