4 ms·
If you grew up with Unix commands it makes sense (mostly), if you grew up with Photoshop it's really not very friendly. Stackoverflow top item on how to redo a
by mtkd 9y ago
If you grew up with Unix commands it makes sense (mostly), if you grew up with Photoshop it's really not very friendly.
Stackoverflow top item on how to redo a commit (one of most common things a new user may need to do):
$ git commit -m "Something terribly misguided"
$ git reset HEAD~
<< edit files as necessary >>
$ git add ...
$ git commit -c ORIG_HEAD
I run a ton of aliases - some of them functions - just to do basics. I really like git - but it is a very steep learning curve for many.
- kccqzy 9y agoIsn’t `git commit --amend` enough? No need to reset and commit again.
- dralley 9y agoMaybe if you only need to add something, but not if you included something you didn't want to in the commit, but you still want to leave the change there.
- SiVal 9y agoSometimes it's easier to undo & redo. That's the reset approach. (Reset, your mistake goes away, do it over again but right, then commit.) Sometimes it's easier to just make another change. That's the amend approach. (Keep what you've got, which was almost right, make another change--add, delete, or edit--so it's right, and re-commit as if you'd made that additional change from the start.)
- orev 9y agoI grew up with Linux and have used cvs, svn, git, and mercurial, not doing complex stuff, just basic. Out of all of them git is the most inconsistent and difficult to learn, both at the command level and in trying to deal with the docs and community around it. Everyone seems to think everyone else is a mathematician and every doc or message has this air of “if you don’t intrinsically understand DAGs then you’re just not worthy to use this tool”.
- IshKebab 9y ago> If you grew up with Unix commands it makes sense (mostly) > I run a ton of aliases ... just to do basics. So... it doesn't make sense then.