what are git submodules? (intermediate) anthony explains

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ค. 2024
  • today I talk about git submodules, what they are, how to add / change / delete them, and why you might use them!
    playlist: • anthony explains
    ==========
    twitch: / anthonywritescode
    dicsord: / discord
    twitter: / codewithanthony
    github: github.com/asottile
    stream github: github.com/anthonywritescode
    I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 12

  • @ndepal
    @ndepal 3 ปีที่แล้ว +9

    In regards to the ambiguity of "git status" saying "new commits" when in fact you went back in time: If you do "git status --submodule" it will show you which commits are removed/added in the submodule (along with the regular output of "git diff").

  • @almasabdrazak5089
    @almasabdrazak5089 3 ปีที่แล้ว +4

    always like your explanations. One more use case.
    We are using protobuffs as a serialization protocol and for it to work you have to have a proto buff files in a repo, so we made one repo and share it between frontend and backend so our proto buffs are always in sync between services

    • @anthonywritescode
      @anthonywritescode  3 ปีที่แล้ว +3

      makes sense! this fits into the "There isn't a package manager for this" use-case -- at a previous company we jammed protos into a pypi package to distribute it!

  • @samibadawi1315
    @samibadawi1315 5 หลายเดือนก่อน +1

    A long overdue thanks!!!

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 2 หลายเดือนก่อน +1

    your videos are too good, can you please create git specific playlist?

  • @oliversheridan-methven8906
    @oliversheridan-methven8906 12 วันที่ผ่านมา

    Something comparing submodules with subtrees would be nice.

  • @rickylim4910
    @rickylim4910 3 ปีที่แล้ว +3

    I totally agree with the pain of git submodules. Regardless of its pain, thank you for the explanation :)

  • @chandanagrawal2399
    @chandanagrawal2399 ปีที่แล้ว

    If you make a change in one of the files of 'astpretty' while being inside 'empty' repo, would be be able to push that change to 'remote astpretty'?

    • @anthonywritescode
      @anthonywritescode  ปีที่แล้ว +2

      you generally shouldn't, but yeah you can make changes inside a submodule

  • @kenpinzky4798
    @kenpinzky4798 2 ปีที่แล้ว +2

    Git ! For the totally insane