简体   繁体   English

合并后修复远程分支

[英]Fixing a remote branch after it has been merged

After completing a bug fix on a separate local branch, I push my branch to a remote and submitted a Pull Request. 在单独的本地分支上完成错误修复后,我将分支推送到远程并提交了“拉取请求”。

After code review it was merged into our main branch. 经过代码审查后,它被合并到我们的主分支中。

Then I found I needed to make additional changes for that branch. 然后,我发现需要对该分支进行其他更改。

So I made those changes on my local branch and pushed them to the remote. 因此,我在本地分支机构上进行了更改并将其推送到远程。

I can't find them anywhere on Github and when I try to make a new branch and cherry-pick the commit, git tells me the commit is empty. 我在Github上的任何地方都找不到它们,当我尝试建立一个新分支并选择提交时,git告诉我提交为空。

What gives? 是什么赋予了?

It is possible that: 它可能是:

  • that branch was deleted after the accepted pull request 该分支在接受拉取请求后被删除
  • that branch (even pushed again) isn't a good candidate for a new pull request (because your new commits should be done on top of the updated master of upstream) 该分支(即使再次被推送)也不适合用于新的请求请求(因为您的新提交应在更新的上游主服务器上完成)

上游的

You should: 你应该:

  • pull from upstream , making sure your local and remote repo have the lastest master from the original repo 从上游拉出 ,确保您的本地和远程存储库具有原始存储库中的最新主服务器
  • make a new branch from there, with your new commits, 使用您的新提交从此处创建一个新分支,
  • make a pull request from that new branch. 从该新分支发出请求请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM