Git's most perplexing paradigm

Поділитися
Вставка
  • Опубліковано 7 чер 2024
  • The better way to learn Git:
    learngit.io/
    More free Git videos on my channel: / @themoderncoder
    Newsletter readers get new videos early: newsletter.themoderncoder.com/
    ----
    DESCRIPTION
    In this video we'll learn how Git utilizes pointers to make creating, deleting & updating branches easy and fast. We'll discuss Git's branching architecture, and uncover just what exactly the saying "branches are just pointers to commits" actually means.
    CHAPTERS
    0:00 Intro
    0:32 The commit tree
    1:11 Commits deconstructed
    2:54 Branch theory
    MY TECH
    www.themoderncoder.com/wfh-ny...
    MUSIC
    Music from Uppbeat (free for Creators!):
    uppbeat.io/t/danijel-zambo/st...
    License code: QCZBFOJ7GBJQT72C
    #git #github #learngit #mergeconflicts #github #gitmerge #gitrebase #stackoverflow #development #softwareengineering #programming #coding #versioncontrol #developer #technology #tutorial #stepbystepguide #gitrepository #vcs #programmingtips #codersofinstagram #codingcommunity #learnprogramming #softwaredevelopment #codingtutorial #gitexplained

КОМЕНТАРІ • 19

  • @shoooozzzz
    @shoooozzzz 16 днів тому

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

  • @tir0__
    @tir0__ 4 місяці тому +2

    Perfect explanation. Amazing channel

  • @chogerlate325
    @chogerlate325 4 місяці тому

    wow, your explaination was exceptional.

  • @BlackLinerer
    @BlackLinerer 4 місяці тому +1

    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  4 місяці тому +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 3 місяці тому

    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  3 місяці тому +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 4 місяці тому +3

    The unsung hero is Torvalds?

    • @themoderncoder
      @themoderncoder  4 місяці тому

      The man, the myth, the legend

    • @pmvenegas
      @pmvenegas 4 місяці тому +3

      He’s pretty well-sung tbf

  • @oreillymj
    @oreillymj 4 місяці тому

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

    • @themoderncoder
      @themoderncoder  4 місяці тому

      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.

  • @UncleJemima
    @UncleJemima 4 місяці тому

    the world could always use more git knowledge

  • @OpenDeepLearning
    @OpenDeepLearning 4 місяці тому

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

    • @themoderncoder
      @themoderncoder  4 місяці тому

      In general? Or this video in particular?

    • @OpenDeepLearning
      @OpenDeepLearning 4 місяці тому

      ​@@themoderncoder In general

    • @themoderncoder
      @themoderncoder  4 місяці тому +1

      @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 4 місяці тому

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