| ▲ | saghm an hour ago | |
My favorite feature is the built-in distinction between what's mutable and what's immutable in my history. I can freely modify any commits I make locally without issue, since no one else would be able to depend on them, but if I push something or fetch it from a coworker, I have the safety of not needing to be careful when doing the equivalent of an amend or rebase because it will fail with an error telling me to use a flag to bypass the immutability protection if that's what I actually want. Not having to stage changes in lieu of them automatically getting picked up was a bit of a learning curve for me, but now that I've gotten used to it I like it a lot better and I don't think I could go back. The equivalent of the reflog pretty much always has my changes in it if I accidentally lose them without manually saving due to the snapshotting, and I have no need for a stash because commits and branches are essentially just recording a checkpoint rather than being things that feel "heavyweight". As an added bonus, dealing with conflicts is a lot less annoying because each commit records its conflicts separately, so fixing them doesn't require doing a stateful pipeline of changes in a big rebase; I can just do them piecemeal, in any order I want, and even just check out other stuff and work on them before coming back later if I feel like it. I was "that guy" who would sometimes have coworkers come for help with git problems (https://xkcd.com/1597/ alt text). I've forgotten most of that knowledge (and all of that muscle memory) and didn't have to learn nearly as much to replace it with the ability to do a lot more with a lot fewer mistakes. | ||