judul-baru’s photos taken on top of main in Mr. Harun’s darkroom: what happens to their numbers? Undo through ORIG_HEAD, bring it into main, or just merge…
Why it matters
A rebase makes history straight and easy to read, but it rewrites commits. Once you know why the numbers change, you know when a rebase is safe (a ribbon nobody else has) and when to merge instead (photos someone already holds).
The key idea
A rebase = reprinting on a new parent
Common mistakes
Rebasing a branch already pushed to others A rebase makes new commits while others still hold the old ones: your histories split and the same change shows up twice. Rebase only ribbons nobody else has; for shared ones, merge.
Every SHA changed after a rebase, though the content is the same A SHA is worked out from the commit’s content, its parent’s number included. The parent changed, so the number changed, all the way to the tip. That is what "rewriting history" means.
The rebase stopped on a conflict Settle the file, git add, then git rebase --continue. Or git rebase --abort to go back exactly as before the rebase.
Try it in this playground
Rebase judul-baru onto main The same changes, new numbers. The old photos fade.
Read the rebase’s trail in git reflog Start, pick by pick, finish: all of it in the logbook.
Undo a rebase through ORIG_HEAD The ribbon goes back to the old photos, the old numbers.
A straight merge after a rebase A fast-forward: no merge photo.