Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git rebase error log history #977

Open
LiuShuaiQ opened this issue Jun 30, 2022 · 2 comments
Open

git rebase error log history #977

LiuShuaiQ opened this issue Jun 30, 2022 · 2 comments

Comments

@LiuShuaiQ
Copy link

Hello, I have a error order history when I use the last tag in main tab.

Here we have main that is a few commits ahead of branches one two and three. For whatever reason, we need to update these three other branches with modified versions of the last few commits on main.

Blow is my git command:

$ git rebase C2 three
$ git checkout one
$ git cherry-pick C4 C3 C2
$ git checkout two
$ git cherry-pick C5
$ git rebase two one

WechatIMG71754

The history of branch one should be:

C2``->C3``->C4``->C5`->C1->C0
@pcottle
Copy link
Owner

pcottle commented Jun 30, 2022

to repro:
https://learngitbranching.js.org/?NODEMO&command=level%20advanced3;%20git%20rebase%20C2%20three;%20git%20checkout%20one;%20git%20cherry-pick%20C4%20C3%20C2;%20git%20checkout%20two;%20git%20cherry-pick%20C5;%20git%20rebase%20two%20one

I think this is because we have some code that tries to understand the order of the commits when rebasing, and that unfortunately assumes the chronological order (what you see above) vs the other in the rebase target

I dont think it applies to most lessons because most of the time we arent rebasing out of order

@LiuShuaiQ
Copy link
Author

Ok, I don't think this is a general problem, the rebase order of other courses is normal.

Thansks for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants