We all have been there… For the beginner it’s easy to mess things up. What are your horror stories with Git?

Link to xkcd

  • @[email protected]
    link
    fedilink
    English
    121 year ago

    If I’m gonna merge some shit that’ll probably have a bunch of conflicts, I’ll create a throwaway “test-merge” branch because I’ll inevitably fuck up the merge and even though I’ve used git for years I have no idea how to revert a merge andatthispointimafraidtoask.jpg

    • @earthquake
      link
      English
      1
      edit-2
      1 year ago

      git merge --abort
      or, after it’s been done, the nuclear option is to git reflog, find the state before your did the merge, and git reset HEAD@{4} or whatever HEAD@{#} it is.