这是 (git rebase 的替代方案 https://stackoverflow.com/questions/39603553/alternative-to-git-rebase/39605048?noredirect=1#comment66530401_39605048)
一个remoteRepo有两个分支,Master和testBranch。 testBranch 领先 100 次提交,落后约 4000 次提交。对 testBranch 进行了更改,但从未合并到 Master 中。
所以我想将 testBranch 重新设置为 master 并给他们一个拉取请求。以便他们可以查看并合并它。
为了达到上述目的,我做了以下操作:
- 在本地分叉并克隆 RemoteRepo
- git checkout test分支
- git 获取原点
- git rebase origin/主控
- 已解决的冲突
但当我解决矛盾的时候git rebase --continue
它说,No rebase in progress?
。所以检查了git status
,
On branch testBranch
Your branch and 'origin/testBranch' have diverged,
and have 4737 and 65 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
然后我做了git commit
。之后再次检查状态
On branch testBranch
Your branch is ahead of 'origin/testBranch' by 4739 commits.
(use "git push" to publish your local commits)
终于做到了git push
并检查状态
To https://github.com/vishnu/proj.git
8d132f4..c192ff7 testBranch -> testBranch
我手动转到分叉存储库并进行检查。它表明 Master 比 proj:master 落后大约 30 次提交。 testBranch 比 proj:testBranch 领先 4739 次。
我不知道发生了什么事。因为我的想法是将 Branch 重新设置为 master,所以我认为我的分支的 master 最终会有更多的提交,我可以向他们提出拉取请求。
或者所做的一切都是正确的,我应该给出这个 testBranch 的拉取请求吗?
这里发生了什么?
任何指导方针都会对我非常有帮助。