News for hackers. Stuff that matters.
Re:It's time to get the Posix elephant off our necks by thefz on Thursday February 23, 2023 @02:24AM (#34907817)
While complaining that Git is haaaard.
Re:It's time to get the Posix elephant off our necks by adastra22 on Thursday February 23, 2023 @02:44AM (#34907961)
Well git is hard tho
Re:It's time to get the Posix elephant off our necks by marginalia_nu on Thursday February 23, 2023 @02:53AM (#34908013)
It's easy if you always do exactly the right thing in the right order and never make mistakes, but if you for example want to undo a git merge[1], god have mercy.

[1] https://opensource.apple.com/source/Git/Git-26/src/git-htmld...

Re:It's time to get the Posix elephant off our necks by psychoslave on Thursday February 23, 2023 @04:02AM (#34908423)
In doubt, I create a new branch from the main one, and test it goes when merging the one holding changes. It something goes wrong, at least the main branch is unaffected.

Of course, you must already have some intuition that something could go wrong. :D

Re:It's time to get the Posix elephant off our necks by imetatroll on Thursday February 23, 2023 @07:22AM (#34909524)
Reflog lets you see where HEAD has traveled from. Just go back in time. This isn't actually a hard problem to solve.

If that sounds difficult just create a branch prior to merging so that you know where to reset your failed branch to.

Re:It's time to get the Posix elephant off our necks by BeeOnRope on Thursday February 23, 2023 @08:06AM (#34910004)
They are trying to solve this problem without rewriting the branch.
Re:It's time to get the Posix elephant off our necks by speed_spread on Thursday February 23, 2023 @08:24AM (#34910215)
It's not that hard, it's actually easy. Very Easy to get into a devolved state where the shortest path back to sanity is to clone the whole repo from scratch.