Git's most perplexing paradigm

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 21

  • @shoooozzzz
    @shoooozzzz 7 месяцев назад +1

    thank you for a true lightbulb moment! It just makes sense now

  • @tir0__
    @tir0__ 10 месяцев назад +2

    Perfect explanation. Amazing channel

  • @CirTap
    @CirTap 4 месяца назад +1

    another goodie!
    speaking of "lost commits": how about making use of those dangling commits that pile up. Any manageable way to restore / revive them and their history into new branches? ... or stashes to explore what went lost for whatever reason. or out of forensic interests 🙂
    I recently deleted a whole stash list by accident and had a hard time to recover these "stash pointers" going through the massive list of SHAs in the dangling commit list and skimming tons of Git's internal diff files. Not fun.

  • @chogerlate325
    @chogerlate325 10 месяцев назад

    wow, your explaination was exceptional.

  • @BlackLinerer
    @BlackLinerer 10 месяцев назад +2

    When you meet at the merge base of two branches, how does git know which of the branches continues and which one stops?

    • @themoderncoder
      @themoderncoder  10 месяцев назад +1

      Essentially Git has this concept of first parent, second parent etc. Git keeps track of which commit is the primary parent and works backwards from there. Here is a good explanation of that in detail: stackoverflow.com/a/50437829

  • @arithex
    @arithex 10 месяцев назад

    I'm an old-timer but recently new to git (~1 year).
    Here are some ideas for content.. things I wish I knew and understood better, day one.
    - how a PR is like a "live link" between two branches -- the way you can continue to push fixes to your branch, to address CR comments etc, while the PR is open
    - what happens to a branch after it's been merged -- why does GH offer to delete it? that seems scary! (I get it, now -- it's just something unexpected and different than other source control systems)
    - (more advanced topic) how to deal with merging to multiple upstream branches.. release-branches, hotfix-branches etc.

    • @themoderncoder
      @themoderncoder  10 месяцев назад +1

      Thanks for these suggestions. Definitely want to do a video on PRs - I like your suggestion of including information about how PRs are updated during the review process, that's a great suggestion.

  • @flamendless
    @flamendless 10 месяцев назад +4

    The unsung hero is Torvalds?

    • @themoderncoder
      @themoderncoder  10 месяцев назад

      The man, the myth, the legend

    • @pmvenegas
      @pmvenegas 10 месяцев назад +3

      He’s pretty well-sung tbf

  • @oreillymj
    @oreillymj 10 месяцев назад

    Interesting video, but I think linked-list is a more accurate model of how commits are tied together.

    • @themoderncoder
      @themoderncoder  10 месяцев назад

      I agree at a high-level, I just didn't want to get into the semantics of singly vs doubly linked lists, and assume the folks watching had pre-existing knowledge of that data structure.

    • @baffy2000
      @baffy2000 3 месяца назад

      More accurate than what? Isn’t that what we just saw?

  • @UncleJemima
    @UncleJemima 10 месяцев назад

    the world could always use more git knowledge

  • @OpenDeepLearning
    @OpenDeepLearning 10 месяцев назад

    I'm just interested in your mind. Why are you doing these videos?

    • @themoderncoder
      @themoderncoder  10 месяцев назад

      In general? Or this video in particular?

    • @OpenDeepLearning
      @OpenDeepLearning 10 месяцев назад

      ​@@themoderncoder In general

    • @themoderncoder
      @themoderncoder  10 месяцев назад +3

      @OpenDeepLearning I started a dev blog in 2016 when I was working as a software engineer at a big FAANG company mostly as a creative outlet. Then I started to make little videos here and there (I knew a bit about video editing because I took a class in HS). Then it just grew from there.
      I think the reason I’m doing this is because it feels good to help people. To make connections. I feel there are a ton of critical software development skills that are under-taught. Git is one of those skills, hopefully I can start covering more as the channel grows.

    • @OpenDeepLearning
      @OpenDeepLearning 10 месяцев назад

      @@themoderncoder Thank you very much! You are an inspiration for me!