The inverse function of git commit is git reset --soft HEAD~1 that simply undoes the commit and leaves your files intact and in the index.
If you understand the actual concepts behind git, everything makes sense, there are no surprises, & you can make pretty much arbitrary edits
-
-
Yes, and no. Despite knowing how git roughly works and lots of experience, git checkout/reset/etc continue to feel a bit inconsistent.
-
I would love an explanation of why git checkout branch and git checkout file are sensible outcomes of a general rule.
-
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.
-
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
-
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. -
git checkout
$file only updates the file and not HEAD. This feels like a pretty different concept from changing HEAD to another branch. -
Yeah actually there was a blog post about that recently that figured out when that happened. Let me find it
-
A little exaggerated imo, but this is it: https://redfin.engineering/two-commits-that-wrecked-the-user-experience-of-git-f0075b77eab1 …
- 4 more replies
New conversation -
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.