3 ms·
I tried using this tool after seeing recommendations for it, but IME it got the parent commit wrong enough times that the work to undo the damage was more than
by imiric 2y ago
I tried using this tool after seeing recommendations for it, but IME it got the parent commit wrong enough times that the work to undo the damage was more than if I had looked up the commit myself and used `--fixup` instead. So I moved back to this manual workflow pretty quickly.
I prefer having full control over my commit history, and this tool is too much magic for my taste. I'm sure that it could be improved so that mistakes are rare, but I'm not sure I would trust it enough to not have to review its work anyway.
- 3eb7988a1663 2y agoI use lazygit for this. Keyboard driven TUI which lets you easily re-order/squash commits with minimum fuss. Being able to see them all laid out means no futzing with identifying the right ids.
- imiric 2y agoI rarely refer to commits by their IDs in these cases, though. More often than not I use the relative `HEAD~n`, when it's easy to determine `n` visually. With a few aliases, the manual fixup workflow really doesn't take much effort.
- montag 2y agoThis sounds just right.
- arcanemachiner 2y agoI love lazygit so much. I use it all the time, and it's constantly improving my workflow.
- insane_dreamer 2y agolazygit also my go-to for this and git in general
- adastra22 2y agoIf it just automatically created the fix up commit and moved it to the proper place in the commit tree, I’d be happy with that. You can then run a one-liner to merge the fix up commits after reviewing.
- BeeOnRope 2y agoThat's exactly what it does by default. Only if you pass --and-rebase does it actually do the autosquash rebase for you.
- globular-toast 2y agoThe more worrying thing for me is how would you know whether it got it right or wrong? I suspect if you're using it the point is you're not going to go and inspect each commit manually. IMO something that looks right is far more dangerous than something that's merely wrong.
- jesseduffield 2y agoLazygit has its own built-in approach to this problem which is much more strict than what git-absorb does (it explicitly asks for confirmation if there's any ambiguity). There's an extensive writeup about it here: https://github.com/jesseduffield/lazygit/blob/master/docs/dev/Find_Base_Commit_For_Fixup_Design.md https://github.com/jesseduffield/lazygit/blob/master/docs/de...
- dawg 2y agoGive git-autofixup a try, never had any incorrect fixup targets with it's hunk-based algorithm.