News for hackers. Stuff that matters.
Re:Mercurial RFC of a new extension to directly operate on G... by chousuke on Wednesday October 30, 2019 @03:27AM (#21395315)
git checkout puts files from the repository into your working directory. For convenience, it will also update the HEAD ref if you check out the full contents of a branch.

I'm not sure what's so confusing about it. Are people thinking of their entire git workdir as the repository? I suppose the fact that .git is often in the same directory as the checkout might lead to people not thinking of them as separate entities.

Re:Mercurial RFC of a new extension to directly operate on G... by comex on Wednesday October 30, 2019 @04:19AM (#21395544)
> For convenience, it will also update the HEAD ref if you check out the full contents of a branch.

And updates the index. And sometimes it gets files from the index instead of a commit.

From a workflow perspective, "switch to working on a different branch", "copy some files into the working tree from a different commit", and "resolve all merge conflicts in this file in favor of 'ours' or 'theirs'" are three very different operations. From a low-level perspective they're somewhat similar, but not the same.

Re:Mercurial RFC of a new extension to directly operate on G... by lilyball on Wednesday October 30, 2019 @03:32AM (#21395333)
> For convenience, it will also update the HEAD ref if you check out the full contents of a branch.

Not quite accurate. From the root of the repo, `git checkout foo -- .` will checkout the entire contents of the branch without updating HEAD.