1、添加远程仓库到本地remote分支

git remote add upstream git@github.com:apache/flink.git # 远程仓库地址

2、查看当前仓库的远程分支

git remote -v
origin  git@github.com:springMoon/flink.git (fetch)
origin  git@github.com:springMoon/flink.git (push)
upstream        git@github.com:apache/flink.git (fetch)  # 远程分支
upstream        git@github.com:apache/flink.git (push)

 3、fetch 远程分支

$ git fetch upstream
remote: Enumerating objects: 76, done.
remote: Counting objects: 100% (76/76), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 166 (delta 72), reused 74 (delta 72), pack-reused 90
Receiving objects: 100% (166/166), 26.84 KiB | 37.00 KiB/s, done.
Resolving deltas: 100% (75/75), completed with 43 local objects.
From github.com:apache/flink
   9410674..abb35b6  master      -> upstream/master
   0130b86..481332e  release-1.8 -> upstream/release-1.8
   0d988d6..2d9c4e7  release-1.9 -> upstream/release-1.9

 

4、合并 fetch 的分支到本地master

$ git merge upstream/master
Updating 9410674..abb35b6
Fast-forward
 docs/dev/table/catalog.zh.md                       | 366 ---------------------
 docs/dev/table/hive/index.md                       |  16 +-
 docs/dev/table/hive/index.zh.md                    |  14 +-
 docs/dev/table/sqlClient.md                        |   2 +-
 docs/dev/table/sqlClient.zh.md                     |   2 +-
 .../test-scripts/kafka-common.sh                   |   2 +-
 .../test_high_parallelism_iterations.sh            |  26 +-
 .../runtime/taskmanager/TaskAsyncCallTest.java     |  14 +-
 .../functions/sql/FlinkSqlOperatorTable.java       |  11 +
 .../planner/codegen/calls/StringCallGen.scala      |   2 +-
 .../planner/expressions/ScalarFunctionsTest.scala  |   2 +-
 .../planner/expressions/SqlExpressionTest.scala    |   4 +
 12 files changed, 53 insertions(+), 408 deletions(-)
 delete mode 100644 docs/dev/table/catalog.zh.md

 

5、查看log最近更新日志

$ git log
commit abb35b6f9bead00fe294c9f0c01aae1676e3d34c
Author: bowen.li <bowenli86@gmail.com>
Date:   Wed Aug 14 16:10:19 2019 -0700

    [hotfix][doc] remove obsolete catalog.md in favor of new catalogs.md

commit e5dd9bcd71201d50d68c6932d438e6e196ea466e
Author: Seth Wiesman <sjwiesman@gmail.com>
Date:   Tue Aug 13 19:04:44 2019 -0400

    [docs] Broken links in Hive documentation

    This closes #9435.

commit 7b4c23255b900ced0afe060194bbb737981405e2
Author: zjuwangg <zjuwangg@foxmail.com>
Date:   Wed Aug 14 22:31:26 2019 +0800

 

6、推送本地master 到远程仓库(自己fork的仓库)

git push origin master

 

posted on 2019-08-14 10:56  Flink菜鸟  阅读(5653)  评论(1编辑  收藏  举报