Edit a merge commit with git rebase
问题 In Git when I have commits eg. A - B - C and I want to edit the B commit, I use git rebase -i <A-commit-hash> , in the list I write edit command in front of B commit, git rebase stops right after B commit so I can fix anything I want using git commit --amend , and then I continue using git rebase --continue . As far as I know this is the best practice how to do this. With this method I can edit any commit in the past (as long as it hasn't been pushed to remote branch yet), and moreover with