by ljiljana on 12/23/19, 8:36 PM with 79 comments
by nneonneo on 12/24/19, 7:09 AM
Also, if you’re in a panic because something went screwy, check “git status” and read every line carefully. status tells you a lot more than you might expect - what branch you’re on, if you’re even on a branch, what merge/rebase/commit operation you’re in the middle of (if any), and even how to go forward with or back out of the current operation.
Finally, commit regularly and often! reflog and rebase mean that you can always maintain a clean history if you want, while committing makes sure that your changes are properly tracked and saved by git so you can rewind when needed. Once you get comfortable with it, git lets you really practice fearless experimentation, which unlocked a whole new level of productivity for me.
by onekorg on 12/24/19, 6:12 AM
There's beauty and elegance in the implementation details of git. You can do and undo with confidence once you can translate the changes you want to make to git object transformations.
To get an overview of the concepts behind git I recommend this article by one of the GitHub founders: http://tom.preston-werner.com/2009/05/19/the-git-parable.htm...
To understand the data structures I suggest: https://codewords.recurse.com/issues/two/git-from-the-inside...
by godot on 12/24/19, 5:06 AM
(It looks like they have a swearing-safe version now at https://dangitgit.com/)
by 3pt14159 on 12/23/19, 10:35 PM
git commit --amend
Doesn't automatically resign (or fail to resign if the key isn't available) a signed git commit message. Anytime there is a non-verified git commit message in my history you can be sure it's because I was a dummy on the original message.by kbenson on 12/24/19, 2:08 AM
Edit: Updated the link to go to the site referenced in the image. Might as well send you to who developed it so they get some credit.
by RickJWagner on 12/24/19, 1:23 AM
by deft on 12/23/19, 10:39 PM
by dang on 12/23/19, 9:31 PM
by chx on 12/24/19, 12:39 PM
by saboot on 12/24/19, 4:11 AM
by sadness2 on 12/24/19, 8:28 AM
by SlowRobotAhead on 12/24/19, 4:56 AM
I’m bad at git. So... wait what now?
When is Master not Origin/Master? I don’t understand what is going on there. Explain?
by juliangamble on 12/23/19, 10:38 PM
git revert -m 1 88113a64a21bf8a51409ee2a1321442fd08db705
by amelius on 12/24/19, 10:19 AM
Anyway, shouldn't git just come with a "undo" command?
by jldugger on 12/23/19, 11:02 PM
by crazypython on 12/24/19, 12:52 AM
by m4r35n357 on 12/23/19, 10:50 PM