Git Internals by John Britton of GitHub - CS50 Tech Talk

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

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

  • @epicgameryt4052
    @epicgameryt4052 Год назад +9

    cs50 is genuinely the best thing out there on youtube. appreciate you all for this free lesson! really made my saturday more fun

  • @AryanK1511
    @AryanK1511 2 месяца назад +1

    One of the best videos out there! Thank you so much for this content!!

  • @nickr753
    @nickr753 3 года назад +101

    ls -h is not hidden, it’s “human readable file sizes”. -a is all files (including hidden) and -l is long form

    • @epicgameryt4052
      @epicgameryt4052 Год назад +1

      that explains why ls -h just didnt work:)) but ls -la did work

  • @nneddenn6207
    @nneddenn6207 Год назад +2

    Thanks for the vide! It was really interesting! I'm a senior dev, but didn't know some of the details. John is excellent at explanations, kudos to him

  • @sidducs
    @sidducs Год назад +2

    This is the best git tutorial on the planet

  • @bs3973
    @bs3973 Год назад +1

    This video changed my life, I swear by it 😭

  • @RoshanGupta-fk9wi
    @RoshanGupta-fk9wi 2 месяца назад

    Woah, this is incredible, it was new for me to know that git does not stores diffs, instead it stores complete snapshot of our repo

  • @Lambdaphile
    @Lambdaphile 4 года назад +9

    Remember your first *git init* command 10 years ago? Started from the init and now we're here! lol

  • @cusematt23
    @cusematt23 Год назад

    Great video thanks John. You are a very good and clear speaker.

  • @raheelmasood8656
    @raheelmasood8656 9 месяцев назад

    Been using Git for 8 years. I guess this is the first time I am actually relating all the commands I use with what is happening behind the scene. The idea of not mixing git branch with a tree like branch is the key here.

    • @countdigi
      @countdigi 4 месяца назад

      Git from the bits up is another good talk which shows behind the scene: ruclips.net/video/MYP56QJpDr4/видео.html

  • @armaghanasghar2911
    @armaghanasghar2911 4 года назад +10

    @46:48 To get the file back via git you would need to (1) use "git log" to get all the commits and after getting commits (2) select the SHA before the file in which git was deleted, and then (3) git checkout . You will get your deleted file back in your working directory, but from there you would need to start a new branch.
    OR
    You could just rebase

    • @antilogism
      @antilogism 3 года назад

      Those are good tools but it can be far easier than that as long as you have not committed yet.
      If you just wan't to roll back the point after the system "rm" but before and/all "git add"s, i.e. still no working file but not staged either, use git reset --mixed (default action, anyway). "Mixed" wont change the working directory, only the staging-area (aka index).
      If you want the ENTIRE working directory to exactly match the present branch commit then "git reset --hard" will do that.
      The problem with reset is you may want to be a bit more surgical, file-wise, about what you are doing as you may have several items staged and you just want a file or two back. Be careful with "--hard' since all changes, not just one or two, are lost.
      In the case in the video this would be fine.
      The delicate way is "git checkout -- new-feature2.rb" as this will grab that one file, leaving all others intact. That double-dash is the key. This can be a list of files too.
      "git checkout -- " is not limited to just HEAD (head being the last commit of the checked out branch) and that means you can pull your lost file from any point in history. Three weeks ago---no problem! (as long as it was committed at some point)
      You can use "git log" or "git reflog" to find a commit hash, branch or tag and use something like "git checkout yeOldTag -- new-feature2.rb". Once the file is back just add and commit as usual.

  • @Pheenam
    @Pheenam 4 года назад +24

    Camera work is great

  • @M.H.Heydarchi
    @M.H.Heydarchi 3 года назад +6

    Good point to learn more about Git. But it would be better to know something before watching this video. Then it will be more effective.

  • @jdeep7
    @jdeep7 2 года назад +10

    for some reason, he looks like Howard Wolowitz

  • @澳贼
    @澳贼 9 месяцев назад

    so deep and clear, thank you!

  • @cacanantes
    @cacanantes Год назад

    Awesome presentation. Thanks for sharing.

  • @mynameisabcd05
    @mynameisabcd05 4 года назад +9

    Thanks Linus Torvalds

  • @ElboxD
    @ElboxD 2 года назад +3

    31:44 really shows how awesome git is.

  • @billtensus
    @billtensus 7 месяцев назад

    I cry every time I see someone using ATOM. That was my favourite text editor. MS $%&u .

  • @lakshminarayanannandakumar1286
    @lakshminarayanannandakumar1286 2 года назад +2

    John Britton reminds me of Richard Henricks from Silicon Valley :)

    • @Tarsonis42
      @Tarsonis42 Год назад +1

      Well, actually... John Britton reminds me of Howard Wolowitz from TBBT :)

  • @dazhouliu9437
    @dazhouliu9437 6 лет назад +20

    Git's internal design is similar to block chain.

  • @mo0lo0ko0
    @mo0lo0ko0 Год назад

    Superb 🙌

  • @mahmoudrezaizadiyar9425
    @mahmoudrezaizadiyar9425 3 года назад +1

    خیلی مردی ، دمت گرم، واقعا مطلب مشتی بود. لوتی گری کردی که یاد دادی داداش.

    • @ehsanmon
      @ehsanmon Год назад

      خخخخخخخخ

  • @AndreySem
    @AndreySem 5 лет назад +4

    топовое видео по гиту

  • @tarikzaki5442
    @tarikzaki5442 3 года назад +6

    using " git cat-file -t " for showing the type of the object and " git cat-file -p " for showing the content of the object was more useful to me than using " git show"

  • @seanys
    @seanys Месяц назад

    The more I learn about Git, the more terrified I become of Linus’s genius, should he ever decide to stop focussing on kernel development and turn to world domination.

  • @mfaani
    @mfaani 3 года назад +9

    This is the best git-internal talk I've seen.
    Is this a Harvard course? Or just a one-off session?

    • @tarikzaki5442
      @tarikzaki5442 3 года назад

      i recommend this one too , it was very helpful to me
      ruclips.net/video/P6jD966jzlk/видео.html

  • @sbhhdp
    @sbhhdp 4 года назад +6

    How do I set up my terminal like his

    • @DannySamuel
      @DannySamuel 3 года назад +2

      Install Oh my zsh

    • @tarikzaki5442
      @tarikzaki5442 3 года назад

      @@DannySamuel i'm using the fish shell and oh my fish , what is the name of this theme?

    • @karthickpn450
      @karthickpn450 2 года назад

      @@tarikzaki5442 bira

  • @kscd009
    @kscd009 4 года назад +3

    Would have been great if covered merge also

  • @jialx
    @jialx 7 месяцев назад

    how have I just today learnt about 'tree' command. wtf

  • @grohan07
    @grohan07 6 лет назад +6

    Which shell is this is he using zsh ?

    • @sandeepjswl1
      @sandeepjswl1 6 лет назад

      Same question

    • @ritamdey6262
      @ritamdey6262 6 лет назад

      Rohan Gupta Yeah!! It looks like zsh

    • @grohan07
      @grohan07 6 лет назад +2

      Es roy yes confirmed plus the oh-my-zsh framework with thr bira theme

    • @AndersJackson
      @AndersJackson 6 лет назад

      Would guess bash, as that is the default for Mac.
      (-h to ls(1) gives human adopted sizes reported by ls)

    • @rabingaire
      @rabingaire 6 лет назад +2

      I achieved the same style of the terminal with zsh, oh-my-zsh and gnzh theme of oh-my-zsh you guys do need to change that symbol to circle as default theme has an arrow as a symbol

  • @dakoderii4221
    @dakoderii4221 Год назад +1

    I find it hilarious that Git changed "master" to "main" to be politically correct but still has a command called "reflog" 🤔😂

  • @Gabriel965519437
    @Gabriel965519437 2 года назад

    how can i configure my console to look the same?

  • @ssksarraju
    @ssksarraju 2 года назад

    Which tool did you use for mouse cursor spotlight effect?

    • @Machina42
      @Machina42 Год назад +1

      Mouseposé for Mac
      PointerFocus for Windows
      Projectuer for Linux

  • @tarikzaki5442
    @tarikzaki5442 3 года назад

    what is the prompt theme that you're using?
    and this shell is bash ,fish or something else?

    • @pointerish
      @pointerish 2 года назад

      Looks like OhMyZsh, but I might be wrong.

  • @guiller2371
    @guiller2371 3 года назад

    "No network activity"

  • @iansullivan9738
    @iansullivan9738 6 лет назад +11

    I wonder if comedians use github for joke development

    • @antilogism
      @antilogism 3 года назад

      There is a charge for private repos but it should work. It works fantastic for any text project including scripts. Helps on solo projects but would be invaluable when working collaboratively with a few or many authors/writers/producers. Deals well with markup like Markdown, LaTeX, Docbook, Lout, troff/groff/nroff, HTML, etc. so the document has consistent formatting throughout.

  • @charbelsarkis3567
    @charbelsarkis3567 5 лет назад +2

    audio is somewhat low

  • @qkcb
    @qkcb 3 года назад +1

    31:05

  • @miko007
    @miko007 Год назад

    ehm...