-
Notifications
You must be signed in to change notification settings - Fork 46
ZH Dev Guide
zrbcool edited this page Sep 2, 2019
·
1 revision
Address: GitHub: Pepper-Metrics
- 打开终端。
- 列出当前fork的远程仓库。
$ git remote -v
> origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
> origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)例如:
origin https://github.com/Lord-X/pepper-metrics.git (fetch)
origin https://github.com/Lord-X/pepper-metrics.git (push)
- 为当前的fork指定上游仓库
$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git例如:
$ git remote add upstream https://github.com/zrbcool/pepper-metrics.git- 最后验证
$ git remote -v
> origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
> origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
> upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch)
> upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (push)例如:
Lord_X_:pepper-metrics zhiminxu$ git remote -v
origin https://github.com/Lord-X/pepper-metrics.git (fetch)
origin https://github.com/Lord-X/pepper-metrics.git (push)
upstream https://github.com/zrbcool/pepper-metrics.git (fetch)
upstream https://github.com/zrbcool/pepper-metrics.git (push)例如,要将上游的dev分支的update更新到本地的master分支中,通过以下步骤完成。
- 打开终端,并将当前工作目录更改为您的本地仓库。
- 从上游仓库获取分支及其各自的提交。 对
master的提交将存储在本地分支upstream/master中。
$ git fetch upstream
> remote: Counting objects: 75, done.
> remote: Compressing objects: 100% (53/53), done.
> remote: Total 62 (delta 27), reused 44 (delta 9)
> Unpacking objects: 100% (62/62), done.
> From https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY
> * [new branch] master -> upstream/master- 检出复刻的本地 master 分支。
$ git checkout master
> Switched to branch 'master'- 将来自
upstream/dev的更改合并到本地master分支中。 这会使复刻的master分支与上游仓库的dev分支同步,而不会丢失本地更改。
Lord_X_:pepper-metrics zhiminxu$ git merge upstream/dev
Merge made by the 'recursive' strategy.
README.md | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
docs/Dev_Guide.md | 0
docs/Dev_plan.md | 2 +-
docs/User_guide.md | 20 ++++++++++++--------
4 files changed, 102 insertions(+), 11 deletions(-)
create mode 100644 docs/Dev_Guide.md- 进入到自己的fork中,点击
New pull request按钮。
- 选择要merge到的上游分支
- 填写comment后,点击create
- merge PR
- 结果
酷划在线成立于2014年,是国内激励广告行业的领军者。酷划致力于打造一个用户、广告主、平台三方共赢的激励广告生态体系,旗下产品“酷划锁屏”“淘新闻”分别为锁屏、资讯行业的领跑者。

感谢作者所在公司酷划在线给作者提供开放的技术环境,并充分支持回馈开源社区项目。
Pepper Metrics is released under the Apache License 2.0.




