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.
-
-
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 …
-
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..
-
git checkout -- file is useful when you want to discard changes, checkout branch -- file is also sort of useful, they should be another cmd.
-
I use git diff file | git apply -R, idiomatic and no surprises.
- 1 more reply
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.