4 ms·
The worst thing about git is how commands are inconsistently overloaded. `git reset` both unstages files (opposite of `git add`, straightforward enough) but al
by MontyCarloHall 5y ago
The worst thing about git is how commands are inconsistently overloaded.
`git reset` both unstages files (opposite of `git add`, straightforward enough) but also can move the current HEAD pointer to an arbitrary commit. You’d think it could then also discard unstaged changes, but nope, that’s `git checkout -- …`, which incidentally has nothing to do with `git checkout`’s other functionality of switching branches.
There are so many other examples of this. `git rebase` can not only rebase but also combine and reorder commits via `rebase -i`, which seems totally unrelated to rebasing. `git branch` and `git checkout` have overlapping but also distinct functionality. I could go on for hours.