Skip to content

Commit f9ae69e

Browse files
committed
[doc] Update git guidelines
1 parent 0f3176e commit f9ae69e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

docs/contribute/contribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ git pull upstream master
2828

2929
#### Update forked repo
3030

31-
```
31+
```bash
3232
# ensures current branch is master
3333
git checkout master
3434

docs/zh-cn/contribute/contribute.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ git pull upstream master
2525

2626
#### 更新 forked 仓库
2727

28-
```
29-
# ensures current branch is master
28+
```bash
29+
# 确保当前的分支(branch)是 master
3030
git checkout master
3131

32-
# pulls all new commits made to upstream/master
32+
# 将【主仓库】(upstream/master)的所有改变都下载到【本地仓库】
33+
# 此时并不会覆盖你本地仓库的内容
3334
git pull upstream master
3435

35-
# this will delete all your local changes to master
36+
# 注意!这会【删除】你【本地仓库】的所有改变,相当于重新对【主仓库】(upstream)做一次 fork
3637
git reset --hard upstream/master
3738

38-
# take care, this will delete all your changes on your forked master
39+
# 注意!这会将你【 GitHub 上的仓库】强行同步为你【当前的本地仓库】
3940
git push origin master --force
4041
```

0 commit comments

Comments
 (0)