3 ms·
A lot of it is easy UX wins left on the table. "git revert" would have been clearer if it were identical but just named "git retract". It's a more natural matc
by adrianmonk 9y ago
A lot of it is easy UX wins left on the table.
"git revert" would have been clearer if it were identical but just named "git retract". It's a more natural match because reverting usually just means going back to how things were, whereas retracting can and often does mean to announce that you are going back. After a newspaper prints something untrue or unfounded, they issue a retraction.
"git checkout -b" is confusing because the main and most significant thing it does is create a new branch, and checking it out is secondary to that. If it had been "git branch -c" instead (create a branch also check it out) that would have been more natural than "git checkout -b" (check out a branch that, incidentally, you will have created).
"git reset", as you mentioned, does two things. This could have been made easier by just splitting it into two commands. Perhaps the first two forms could be called "git unstage". The git book ( https://git-scm.com/book/id/v2/Git-Basics-Undoing-Things https://git-scm.com/book/id/v2/Git-Basics-Undoing-Things ) explains it under a heading called "Unstaging a Staged File", which suggests that it's a more natural term.
- Already__Taken 9y agogit reset should be renamed to git remove, because add is used to add the staging. Or "git add" should be "git stage" "git remove" should then be "git delete".
- erik_seaberg 9y agoThe staging area was a mistake because it's hidden in the repo where I can't build and test it. I should be stashing changes I don't want to commit, and then committing the known-good workspace.