Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Exactly. The way I see it is that “checkout” has two arguments:

- the commit you want to checkout, which defaults to HEAD

- the files you want to checkout, which defaults to everything

Simple as.



The problem is that this breaks down when you specify both arguments. Doing `git checkout branch file` checks out file from branch to the working tree, but doesn't change HEAD.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: