This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new bf9b664 Improve contributor git operation doc (#14627)
bf9b664 is described below
commit bf9b664f097ce5791c1b701a2ef659b1cbf85ad0
Author: Hongsheng Zhong <[email protected]>
AuthorDate: Sun Jan 9 13:33:31 2022 +0800
Improve contributor git operation doc (#14627)
---
.../community/content/contribute/contributor.cn.md | 20 +++++++++++++++-----
.../community/content/contribute/contributor.en.md | 22 ++++++++++++++++------
2 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/docs/community/content/contribute/contributor.cn.md
b/docs/community/content/contribute/contributor.cn.md
index 702bac6..045f3a1 100644
--- a/docs/community/content/contribute/contributor.cn.md
+++ b/docs/community/content/contribute/contributor.cn.md
@@ -18,12 +18,19 @@ chapter = true
## 开发流程
-**1. Fork分支到本地,设置upstream**
+**1. 准备仓库**
- - 从shardingsphere的repo上fork一个分支到您自己的repo来开始工作,并设置upstream为shardingsphere的repo。
+到 [ShardingSphere GitHub Repo]( https://github.com/apache/shardingsphere )
fork 仓库到你的 GitHub 账号。
+克隆到本地。
```shell
-git remote add upstream https://github.com/apache/shardingsphere.git
+git clone https://github.com/(your_github_name)/shardingsphere.git
+```
+
+添加 ShardingSphere 远程仓库。
+```shell
+git remote add apache https://github.com/apache/shardingsphere.git
+git remote -v
```
**2. 选择issue**
@@ -38,11 +45,13 @@ git remote add upstream
https://github.com/apache/shardingsphere.git
```shell
git checkout master
-git pull upstream master
+git fetch apache
+git rebase apache/master
+git push origin master # 可选操作
git checkout -b issueNo
```
- **注意** :PR会按照squash的方式进行merge,如果不创建新分支,本地和远程的提交记录将不能保持同步。
+ **注意** :PR 会按照 squash 的方式进行 merge。如果不创建新分支,本地和远程的提交记录将不能保持同步。
**4. 编码**
@@ -68,6 +77,7 @@ git push origin issueNo
```shell
git checkout master
git branch -d issueNo
+git remote prune origin # 如果你已经在 GitHub PR 页面删除了分支,否则的话可以执行下面的命令删除
git push origin --delete issueNo
```
diff --git a/docs/community/content/contribute/contributor.en.md
b/docs/community/content/contribute/contributor.en.md
index d2db996..e87c8fc 100644
--- a/docs/community/content/contribute/contributor.en.md
+++ b/docs/community/content/contribute/contributor.en.md
@@ -18,12 +18,19 @@ You can report a bug, submit a new function enhancement
suggestion, or submit a
## Developer Flow
-**1. Fork ShardingSphere repo**
+**1. Prepare repository**
- - Fork a `ShardingSphere` repo to your own repo to work, then setting
upstream.
+Go to [ShardingSphere GitHub Repo]( https://github.com/apache/shardingsphere )
and fork repository to your account.
+Clone repository to local machine.
```shell
-git remote add upstream https://github.com/apache/shardingsphere.git
+git clone https://github.com/(your_github_name)/shardingsphere.git
+```
+
+Add ShardingSphere remote repository.
+```shell
+git remote add apache https://github.com/apache/shardingsphere.git
+git remote -v
```
**2. Choose Issue**
@@ -34,15 +41,17 @@ git remote add upstream
https://github.com/apache/shardingsphere.git
**3. Create Branch**
- - Switch to forked master branch, pull codes from upstream, then create a new
branch.
+ - Switch to forked master branch, update local branch, then create a new
branch.
```shell
git checkout master
-git pull upstream master
+git fetch apache
+git rebase apache/master
+git push origin master # optional
git checkout -b issueNo
```
- **Notice** :We will merge PR using squash, commit log will be different form
upstream if you use old branch.
+ **Notice** :We will merge PR using squash, commit log will be different with
upstream if you use old branch.
**4. Coding**
@@ -68,6 +77,7 @@ git push origin issueNo
```shell
git checkout master
git branch -d issueNo
+git remote prune origin # If you delete branch on GitHub PR page, else you
could delete origin branch with following command
git push origin --delete issueNo
```
**Notice**: Please note that in order to show your id in the contributor
list, don't forget the configurations below: