I would love an explanation of why git checkout branch and git checkout file are sensible outcomes of a general rule.
-
-
Replying to @sortiecat
I guess what I mean is that the data model is clear and consistent. Some of the complex command behavior on top of that, less so.
1 reply 0 retweets 1 like -
Replying to @RichFelker
I want to implement own git front end at some point and just experiment a bit with commands like reset/checkout and what sense I can make
2 replies 0 retweets 0 likes -
Replying to @sortiecat @RichFelker
Yeah I have a wrapper that softens the sharp edges of git. I ALMOST made git checkout
$file error but I use that with no issues regularly.2 replies 0 retweets 0 likes -
Replying to @frioux @RichFelker
git checkout
$file only updates the file and not HEAD. This feels like a pretty different concept from changing HEAD to another branch.1 reply 0 retweets 0 likes -
Replying to @sortiecat @RichFelker
Yeah actually there was a blog post about that recently that figured out when that happened. Let me find it
1 reply 0 retweets 0 likes -
A little exaggerated imo, but this is it: https://redfin.engineering/two-commits-that-wrecked-the-user-experience-of-git-f0075b77eab1 …
1 reply 2 retweets 1 like -
Replying to @frioux @sortiecat
I was happily unaware of the (imo useless) git checkout with a file/path argument and still no worse off as long as I don't typo a command..
1 reply 0 retweets 0 likes -
Replying to @RichFelker @frioux
git checkout -- file is useful when you want to discard changes, checkout branch -- file is also sort of useful, they should be another cmd.
1 reply 0 retweets 0 likes -
Replying to @sortiecat @frioux
I use git diff file | git apply -R, idiomatic and no surprises.
1 reply 0 retweets 1 like
And I can preview git diff file first to make sure it's what I expect.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.