[英]how do a Git Rebase in Sourcetree?
I want my local master branch to include the commit 'fixed js errors' and be rebased into origin/master. 我希望我的本地主分支包含提交'fixed js errors'并重新定位到origin / master。
I started the process like this: 我开始这样的过程:
Which leads me to this: 这让我想到了这个:
But as you can see, I'm asked to pull before I push. 但正如你所看到的,在我推动之前,我被要求拉。 And every time I pull I end up with a situation depicted in the first image.
每次我拉动时,我都会遇到第一张图片中描绘的情况。 What am I doing wrong?!
我究竟做错了什么?! Thanks,
谢谢,
Your original structure would not support rebasing. 您的原始结构不支持变基。 Let's say you had a commit to your local
master
and someone else had committed (and pushed) another change to origin/master
. 假设你有一个对你当地
master
的承诺,而其他人已经提交(并推动)另一个对origin/master
更改。 In this scenario, you could rebase your commit on top of the other commits. 在这种情况下,您可以在其他提交之上重新提交您的提交。
Your scenario has a commit from a completely different branch. 您的方案具有来自完全不同的分支的提交。 You would either need to merge your other branch into
master
, or you could cherry pick that one commit and apply to the master
branch. 您可能需要将其他分支合并为
master
,或者您可以选择一个提交并应用于master
分支。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.