3 ms·
I often use Sublime Merge to reword commits (edit commit message, even other branches, the entire log is visible), or to split up commits (it undoes the commit
by jandeboevrie 4y ago
I often use Sublime Merge to reword commits (edit commit message, even other branches, the entire log is visible), or to split up commits (it undoes the commit and you get everything in the working directory), so I’m not sure if his comparison table is entirely correct. (At least from a user point of view I can easily edit or reword).
One other nice feature of Sublime Merge is the squashing of two commits, ignoring the latters message (as a fixup). Not sure how to do that in one click or command with cli git…
- arxanas 4y agoCan you reword/split commits without having them checked out, or without touching the working directory? That’s what these criteria are about, and from your description, it doesn’t sound like you can do those directly in Sublime Merge.
- kemayo 4y agoYou can only edit any commit that's reachable from the current HEAD without checking it out. I.e. a commit that's in a branch that's not merged back into wherever you currently are can't be edited. (I made a test repo to check this, because it had actually never come up before in my day-to-day usage.)
- arxanas 4y agoThanks for pointing this out. I confirmed that you can reword a commit without checking it out, with the caveats: - It has to be an ancestor of `HEAD`, like you said. - Doing so doesn't invoke Git's `post-rewrite` hook, which can cause interoperability issues with other tools :( - Doing so will abandon at least some descendant branches (possibly all descendant branches which aren't checked out, or possibly just those which branch aren't ancestors of `HEAD`). - Doing so doesn't seem to be undoable inside Sublime Merge via the undo command.