几个月前我 fork 了一个存储库。我对开发分支进行了一些修改并发出了 pull 请求,该请求后来 merge 到了它的分支仓库中。
现在我想进行更多修改,但是我派生的存储库有很多更新。
我需要在我的 GitHub 帐户的 fork 存储库中进行这些更新。我尝试执行以下所有步骤:
$ git clone <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2f48465b6f48465b475a4d014c4042" rel="noreferrer noopener nofollow">[email protected]</a>:rupali/jira-plugin.git
$ cd jira-plugin && \
git remote add jira-upstream <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8fe8e6fbcfe8e6fbe7faeda1ece0e2" rel="noreferrer noopener nofollow">[email protected]</a>:jenkinsci/jira-plugin.git
$ git fetch jira-upstream
$ git merge jira-upstream/master
但我仍然看不到我帐户中 fork 存储库的任何更改。它仍然显示几个月前出现的相同提交。
不知道我在哪里犯了错误。知道这里出了什么问题吗?
最佳答案
假设您 merge 了 jira-upstream/master
到您本地的master
分支,如果您希望看到这些更改反射(reflect)在 GitHub 上的远程源存储库中,那么您需要将更新推送到那里,如下所示:
$ git push origin master
这假设您有 <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="284f415c684f415c405d4a064b4745" rel="noreferrer noopener nofollow">[email protected]</a>:rupali/jira-plugin.git
设置为origin
远程,它应该基于您的 clone
命令在你的问题中。
关于git - merge 后如何在 fork 的 GitHub 存储库上重新工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17634441/