5 ms·
For me the UX issue was that I came from "svn" and "svn checkout" is a VERY different command. Obviously this is not git's fault. I suspect git is much easier
by gsylvie 9y ago
For me the UX issue was that I came from "svn" and "svn checkout" is a VERY different command. Obviously this is not git's fault. I suspect git is much easier to learn for those untainted by svn.
As for "git checkout branch" and "git checkout -- branch" doing very different things, I find the "--" works well to bump my mental model into the right state, and so in practice I'm never confused about the distinction.
It also helps (a lot!) that "git status" teaches us about these modes for "git checkout --" and "git reset HEAD":
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: pom.xml
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes)
modified: src/main/java/com/bitbooster/FoxtrotHook.java
- CJefferson 9y agoThe problem is the `--` isn't compulsory. Quick quiz, what does: git checkout x/y do? At least: * Reset a file called x/y * Check out a branch y from a remote x * Check out a local branch called x/y