Github 上怎样把新 commits 使用在自己的 fork 上?
关注者
316被浏览
64,37411 个回答
让我来教你只用Github不用命令行的方法:
举例说明: (每一步都有截图)
这一页往下面拉:
这里用
@王月的repo做了例子, 他的频繁更新让我有了截图的机会~ 感谢他.
玩的愉快!
https://help.github.com/articles/fork-a-repo
Step 3: Configure remotes
When a repo is cloned, it has a default remote called origin that points to your fork on GitHub, not the original repo it was forked from. To keep track of the original repo, you need to add another remote named upstream:
$ cd Spoon-Knife
# Changes the active directory in the prompt to the newly cloned "Spoon-Knife" directory
$ git remote add upstream https://github.com/octocat/Spoon-Knife.git
# Assigns the original repo to a remote called "upstream"
$ git fetch upstream
# Pulls in changes not present in your local repository, without modifying your files
Pull in upstream changes
If the original repo you forked your project from gets updated, you can add those updates to your fork by running the following code:
$ git fetch upstream
# Fetches any new changes from the original repo
$ git merge upstream/master
# Merges any changes fetched into your working files
Read the friendly manual.
---- 更新:不用命令行的话我也不会了 ----