Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My main complaint is it's leaking abstractions. You basically need a PhD in git's internal data structures to use git. Well not the 5% of git you typically need in your day-to-day, but the other 95%, which you need when the 5% you do need somehow goes wrong, through one of the many foot-guns git offers.

A concrete example: Accidentally pushing a merge you didn't want to push and now you're stuck staring git-revert(1) which has the sentence below, scratching your head like "uh, what's a parent number?"

       -m parent-number, --mainline parent-number
           Usually you cannot revert a merge because you do
           not know which side of the merge should be
           considered the mainline. This option specifies
           the parent number (starting from 1) of the
           mainline and allows revert to reverse the change
           relative to the specified parent.
Maybe you google a bit, and find this: https://www.christianengvall.se/undo-pushed-merge-git/ ... which explains a bit, but is still confusing as all hell. The rabbit hole continues to this: https://opensource.apple.com/source/Git/Git-26/src/git-htmld... which is also... not really clear.

But you still can't find information about what a "parent number" is. It turns out, the parent number is the order they show up in within 'git show HASH'. Combining that clue with Linus Torvalds email above may let you undo the merge, if you can make sense of his Feynman diagrams. Maybe.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: