git - 如何在github上更新一个fork

标签 git github

<分区>

我在 github 上 fork 了一个 repo 并更改了一些东西。 原始 repo promise 了一些事情。 如何在不重新 fork 和撤消所有更改的情况下更新我的 fork ?

最佳答案

从您本地项目文件夹中的终端...(前提是您有 configured the remote for your fork )

git fetch upstream
git checkout master
git merge upstream/master

(有关更多信息,请参阅 github Syncing a fork docs)

关于git - 如何在github上更新一个fork,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31096236/

相关文章:

git - git下提交文件时如何控制重命名阈值?

github - Git 要点缺少字段用户

python - 如何在 github 存储库中包含通用 secret /配置文件(用于 CI 目的)而不将其部署到生产环境

eclipse - 从 Github 导入 Ant 项目

github - 如何只关注 Github 上的特定问题,而不是观看整个项目?

git - 如何在 GitHub 中仅使用我的分支存储库的主分支中的最新提交执行 pull 请求

Git merge : parallel identical additions are merged without conflict by including the same code block TWICE in the merged file without complaint. 为什么?

php - 使用 PHP 编写 git hooks

git - GitHub 附带的 Git 版本没有别名功能吗?

github - GitHub 如何支持 oembed?