Re: several quick questions
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 15, 2006, 00:34 UTC
- Message-ID
- <7vpslppii0.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <43F270F5.7070804@op5.se>
Andreas Ericsson <ae@op5.se> 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).