Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的情况是:
我现在能做的最好的事情是让我的起源回到远程头部?
您只需要获取原点,并将当前分支重新设置在它之上。 这可能就足够了。
git pull --rebase upstream
但是,您可能想要签出另一个分支,而不是您用于修复的分支,因为重新应用已被接受的修复的提交是没有意义的(来自不同拉取请求的不同提交)。
这假设您在本地 repo 中声明了一个名为“upstream”的远程 repo 地址,指的是您分叉的原始 repo。 在更新的上游基础上重新调整正在进行的工作后,您可以推回原点(您的分叉)。