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

But in your terms, a branch is the files it contains. Or rather: Changes gathered in a commit can be changes to several files. A branch is just a chain of commits, each based on the previous ones. So what a branch "is", is a bunch of (bunches of) changes to one or more files. Therefore, "checking out a branch" is checking out (a bunch of changes to) one or more files. And now you want to "check out one file from another branch"... Is it really any wonder that doesn't make much sense?

I think your doing yourself a disservice by even thinking in terms of "checking out a file" as separate from checking out a branch. The units git deals in are commits and branches, not really individual files as such. If you want to use it, better get used to thinking in the same units it does.



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

Search: