3 ms·
1. git commit lib/bar.x 2. git commit foo.x 3. git commit --fixup sha_of_1 4. git commit --fixup sha_of_1 5. git commit --fixup whichever_is_app
by yencabulator 3y ago
1. git commit lib/bar.x
2. git commit foo.x
3. git commit --fixup sha_of_1
4. git commit --fixup sha_of_1
5. git commit --fixup whichever_is_appropriate
n. git rebase -i where_ever_you_branched_off
You call git rebase "worst" purely because you don't currently see the value in granular commit history. If and when you do, git rebase is just the tool for the job.
`git merge --no-commit` only works for trivial things, real world is a lot messier than that. But perhaps you haven't needed to deal with the complex changes. For an idea of what complex changes look like, skim some linux kernel VFS or MM refactoring patch sets.