TIL: Semi-Linear History
I have been doing this for a while, but I only recently learned that it’s called “semi-linear history”.
You merge a feature branch into the main branch by first rebasing it onto the main branch, and then creating a merge commit.
It makes perfect sense to me: you keep feature branches up to date with the main branch and create merge commits, which lets you see individual changes clearly separated from other commits.
GitLab implemented “semi-linear history” back in 2016, and GitHub still doesn’t support it.