Story time…

  • Martin@feddit.nu
    link
    fedilink
    arrow-up
    10
    ·
    10 months ago

    When a colleague generated a dia graph for each git object that got created when he made a few commits. Understanding the underlying data model was a real aha moment. 13 years later and I’m still grateful for his “mini git course”.

  • nothead@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    10 months ago

    That time I accidentally wiped an entire open source project on github and had to learn real quick how to undo a destructive commit.

    Somehow after an entire night of google-fu, reading the git book three times, and tutorial videos, I got the right series of commands to fix it and nobody ever figured out what I did.

    All I wanted to do was fix a typo in an imported module…

  • TechNom (nobody)@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    10 months ago

    You never reach a phase when you can confidently say that you understand git. But it’s certainly possible to go from “When something goes wrong, I just delete the repo and clone it again” to “Aha! Now I can deal with most of the issues”.

    Mine was when I realized that git commands come in two flavors. Those that deal with commits as snapshots (commit, checkout, switch, reset, etc) and those that deal with commits as changes/diffs/deltas (merge, rebase, cherrypick, revert, etc). (Note: This isn’t about how git stores commits on disk). I believe that this is actually the main source of confusion for beginner and intermediate git users.

  • cafuneandchill@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    10 months ago

    When I first saw this post, it had no comments on it, and thought to myself “Wouldn’t it be kinda funny if nobody answers that question?”

    Don’t think I ever had any particular epiphanies concerning Git? Maybe when I played Oh My Git?

  • Croquette@sh.itjust.works
    link
    fedilink
    arrow-up
    5
    ·
    10 months ago

    When I took time to learn the CLI so I don’t need to use any GUI. Still an amateur, but at least git isn’t a black box anymore.

  • magic_lobster_party@kbin.run
    link
    fedilink
    arrow-up
    4
    ·
    10 months ago

    When I learned about the reflog. I became less afraid of my changes when I knew I could easily recover from my errors. This allowed me to experiment more with git and become more proficient in it.

    Another aha moment was learning that an easy way to squash commits is just to do a git reset followed by git commit -am “whatever”

    • TechNom (nobody)@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 months ago

      Another aha moment was learning that an easy way to squash commits is just to do a git reset followed by git commit -am “whatever”

      You can do that in a single step instead with git commit -a --amend.

  • ExperimentalGuy@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    10 months ago

    I initially just used it on personal projects just so I could rollback if I needed to. Afterwards I realized that you could branch after watching Fireship videos. I never got an aha moment, but the moment I really understood was after my first pull request to a project I liked at the time.

  • corsicanguppy@lemmy.ca
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    10 months ago

    It’s only been a decade. Hasn’t happened yet.

    sccs, clearcase, rcs, cvs, sure. I’m still deeply in dunning-kruger land for git.

  • NigelFrobisher
    link
    fedilink
    arrow-up
    2
    ·
    10 months ago

    When I learned that Linus was behind it, otherwise something more straightforward would likely have won the most mindshare.

  • Kissaki@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    10 months ago

    I don’t think I had a moment like that.

    I discovered it, along with other DVCS when it came up, and looked into it and learned it. It was reasonable and intuitive enough for me. As far as I can remember anyway. (I don’t have particular memories of that.)