Live data from Hacker News

Git pretty

justinhileman.info

1–10 of 65 posts

Re: Git pretty

#2
That is a really fun poster to have!

I hope of course that people realize you should not rely on this as an educational tool but merely as a quick reference. Please, don't use any of these commands without knowing what they do!

Re: Git pretty

#4
This is excellent: opinionated and correct.

Guess what happens if you try to git revert a merge? Yeah. Don’t do that.

You can, but you really need to understand what happens when you do so, so that you're not confused by future merges from the same branch. Straight from the horse's mouth:

https://www.kernel.org/pub/software/scm/git/docs/howto/rever...

Re: Git pretty

#6
Great tool for young interns! :D

I think there is a small mistake though, for the "I accidentally commited something": the answers yes and no for "Has anyone else seen it?" are inverted.

Re: Git pretty

#7
post #6

Great tool for young interns! :D I think there is a small mistake though, for the "I accidentally commited something": the answers yes and no for "Has anyone else seen it?" are inverted.

Hmm, I don't think so. The answer for "yes" is to do a `git revert`, which does not modify history. Instead, it creates a new commit.

The answers for "no" all involve modifying history, which I think is generally perceived to be quite OK so long as you aren't modifying history that is public.

Re: Git pretty

#10
post #9

What does "I don't think it means what you think it means" refer to?

Possibly that `git revert` doesn't somehow remove the commit you've done, rather it creates a new commit removing the changes, along with a commit message saying which commit is being reverted.
Post reply on HN