Thread (1 message) 1 message, 1 author, 2016-06-15

Re: several quick questions

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:19

Andreas Ericsson [off-list ref] writes:
Heh. You're right. :) Didn't grok that from the man-page. I'm so used
to seeing <commit-ish> everywhere that when it says "<branch> can be
any object that refers to a commit" I get confused.
You are right; the documentation is wrong.  It says

'git-checkout' [-f] [-b <new_branch>] [-m] [<branch>] [<paths>...]

It should have said something like:

git-checkout [ -f | -m ] <branch>    		or
git-checkout [-b <new_branch>] <committish>	or
git-checkout [<committish> | -- ] <paths>...

The first form is to switch to a branch (with flag to say what
to do when conflict can lose local modification); the second
form is to create a new branch out of comittish and switch to
it; and the third is not switching branches but just checking
out named paths out of index or arbitrary comittish (I think any
ent should do but I have not verified it).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help