We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github 我们经常会通过 fork 开源项目在自己的仓库中更新,然后提交 Pull Request (Merge Request) 为开源项目做贡献。
不过我们经常会遇到原仓库更新,重新 fork 显然是不优雅的,那我我们该怎么同步更新呢?
git remote -v
2. 指明我们需要同步的仓库
git remote add upstream https://github.com/OriginalRepo/OriginalProject.git
3. 验证
4. 拉取更新的 branches 和 commits
git fetch upstream
5. Checkout 本地分支
git checkout master
6. 合并
git merge upstream/master
7. 提交
git push origin master
Github 使用经典问题:如何同步 fork 项目原仓库的更新 - 知乎
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Github 使用经典问题:如何同步 fork 项目原仓库的更新
Github 我们经常会通过 fork 开源项目在自己的仓库中更新,然后提交 Pull Request (Merge Request) 为开源项目做贡献。
不过我们经常会遇到原仓库更新,重新 fork 显然是不优雅的,那我我们该怎么同步更新呢?
如何在 Github 网页端同步更新?
如何通过本地命令行同步更新?
2. 指明我们需要同步的仓库
3. 验证
4. 拉取更新的 branches 和 commits
5. Checkout 本地分支
6. 合并
7. 提交
Github 使用经典问题:如何同步 fork 项目原仓库的更新 - 知乎
The text was updated successfully, but these errors were encountered: