Hacker News new | past | comments | ask | show | jobs | submit login

"under the hood git rebase main is merging the current branch into main (it’s like git checkout main; git merge current_branch"

This is wrong. 'git rebase main' doesn't affect main at all! If you are on main and check out a new branch, then add commit-one, then switch back to main and add commit-two, then switch back to the new branch and 'git rebase main', your new branch will have commit-one and commit-two, and main will still only have commit-two.

it's much more like simply 'git merge main' with some extra magic to avoid a separate merge commit.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: