Yeah learned this the hard way.

  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 months ago

    I’ve had juniors who didn’t believe this, so just to say it: If you know what you’re doing, practically any Git problem is recoverable.

    The one major exception is if you delete your local changes before committing them.

    • sorter_plainview@lemmy.today
      link
      fedilink
      arrow-up
      1
      ·
      4 months ago

      Yeah.But many of them are extremely annoying. Specifically screwing up rebase. It is recoverable, but very annoying.

      That said I have seen juniors make two other common mistakes.

      1. Pushing your commit without fetching
      2. Continuing on a branch even after it was merged.

      I’m fed up with these two. Yesterday I had to cherry-pick to solve a combination of these two.