3 ms·
This presentation of gitless makes it attractive. I'll give it a try. One of my problem for which I didn't find a satisfying solution yet is to efficiently see
by chmike 10y ago
This presentation of gitless makes it attractive. I'll give it a try.
One of my problem for which I didn't find a satisfying solution yet is to efficiently see the changes in commits and reshuffle and merge them.
Actually, when I do a change, I offten see and fix typos and other bugs or refactor code in the same step. So my commits tend to be a compilation of unrelated changes instead of clean atomic commits. It is a boring work to split these commits into nice and clean commits.
I know I should commit frequently (small changes), and then afterward merge related commits. But that is not easy with git and I suppose gitless too. So I tend to do big commits which is bad. Any suggestion how I could improve my commits ?
- aninhumer 10y agoThis might already be what you're using, but just case (and for other people's benefit) `git rebase -i` is very helpful for reordering and combining a bunch of small commits. (I mention it because you're referring to "merging" rather than squashing or fixups.) It opens a text file listing your commits prefixed with a command, which you can reorder and edit to change the history in one go. It's not completely painless, and I still prefer to do operations one at a time with it in case there are any conflicts, but it's still better than the alternative. (I'm not even sure what I do instead...)
- chmike 10y agoThanks. I saw that gitless has the option -p that is documented as allowing to select parts of a file to commit. I'm curious to test that. It seam possible to reshuffle commits using `gl fuse` which is a kind of `git rebase`, but there is no interactive mode as with rebase. Just found a limitation in gitless. I can't publish tags.