我已经在 github 上创建了一个 fork 项目。我做了一个提交并请求它。此提交已获批准。然后我进行第二次提交并提出请求。但是在 pull request 中有 2 次提交:我的第二次提交和已批准的旧提交。如何同步我的存储库和主存储库?
最佳答案
从上游存储库 merge 回来,或在新分支上创建新的 pull 请求。
或者在上游之上 rebase :
git remote add upstream (url-for-upstream-repository)
git fetch upstream
git rebase upstream/master
git push -f origin
(do new pull request on website)
关于没有旧提交的 Github pull 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5415560/