Git Tutorial: All About Submodules

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ต.ค. 2024
  • In this Git tutorial, learn what submodules are and when you should use them.
    If you're looking for a good Git GUI client to help make working with Git more intuitive, check out GitKraken!
    Download GitKraken free at bit.ly/2ExnR6K
    #git #gitkraken #gitclient #gitgui #learngit #programming #github #bitbucket #gitlab

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

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

    This is the only useful video I've found on submodules so far. Everyone keeps beating around the bush, and I never get anything out of watching those videos. Thanks for being very precise and short in what a submodule is. If you also have a video on subtrees as well, so I can figure out which of the two to use, that'd be brilliant. I'll have a look on your channel! :-)

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

      Doesn't look like you have a video titled "All About Subtrees"? - New video suggestion. :-)

  • @AzlanIkram-me1em
    @AzlanIkram-me1em 4 หลายเดือนก่อน +1

    a very simplified explaination. Thanks

  • @CameronChardukian
    @CameronChardukian 4 ปีที่แล้ว +1

    This was a great introduction to the concept of submodules in Git. Thanks for sharing!

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

    Best explanation without fuffing about

  • @Gulzt
    @Gulzt 7 ปีที่แล้ว +8

    Short and informative, thx!

  • @mahmud-ahsan
    @mahmud-ahsan ปีที่แล้ว

    Thank you, easy to understand and elegant!

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

    Great tutorial, I am using submodules all the time, so made a video and blogged too :) Thanks for tutorial.

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

    Thank you so much! That was exactly the piece of information I needed :)

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

    This was great, thank you!

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

    Cool explanation but where is the rest of "All About Submodules"?
    How do I set it up from scratch? What commands I have to do? Practical example?

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

    Great explanation and handy tool.

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

    Question: Lets say you own "repo A" and you want a submodule to "repo B" that another group manages. What happens if you need to add something to the submodule (repo B) that the original owner of "repo B" deems unwanted or ridiculous and doesn't want you to even have that commit in an independent branch on their remote since the commit is not deemed useful for the rest of "repo B" userbase. How would you make that submodule commit available to the rest of the users of "repo A" if "repo B"'s owners deny the remote push?

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

      The owners of "repo A" would fork "repo B" into "repo C" and then update the submodule to point to "repo C" instead of "repo B". Then the owners of "repo A/C" can push any changes they want.

    • @ss4adam
      @ss4adam 2 ปีที่แล้ว

      ​@@GitKraken Thank you for the reply. At that point, if the organization owning "repo A" only needed to use "repo B" (or C) as a subcomponent of "repo A" and not for that organization's other repos, I'm guessing that a subtree may be easier to maintain everything in one place. I know this is getting into the design decision territory, but it sounds like a subtree would usually be better for cases where unapproved changes to a dependency repo may be required (unless you are willing to go through the overhead of forking and maintaining that fork). I'm thinking of which cases minimize repo maintenance and reduce training time for onboarding new developers when you only have guaranteed control over "repo A" with the option to fork other repos if you're willing to pay the maintenance cost.

  • @cruepprich
    @cruepprich 3 ปีที่แล้ว

    Very well explained. thx

  • @mikaflower4514
    @mikaflower4514 4 ปีที่แล้ว

    Thanks for the information

  • @ricardoamendoeira3800
    @ricardoamendoeira3800 7 ปีที่แล้ว +5

    What happens if the repo I add as a submodule ceases to exist? Does it break horribly or can I just upload my local copy of the submodule to a new repo, change the origin and everything works again?

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

    What about when the submodule repo is the same module where you develop? Headaches..

    • @Priva_C
      @Priva_C 4 ปีที่แล้ว +1

      Headache is an understatement....

  •  7 ปีที่แล้ว +4

    Hi.
    What happens if i do change inside submodule a file and i want update the main root
    for example:
    /proyect main
    submodule /proyect @ d4b9dc90
    @d4b9dc90 this should will change
    pd: zorry my english ..
    regards

  • @villager2556
    @villager2556 7 ปีที่แล้ว

    Thanks for the information! Didn't even know about that :D

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

    i don't understand the problem this solves. package managers already solves this problem afaik. is this for the case where there's no package manager?

  • @ShampooWow
    @ShampooWow 7 ปีที่แล้ว

    Awesome video! I like it

  • @alexanderenchevich1737
    @alexanderenchevich1737 6 ปีที่แล้ว +16

    All about submodules? "All"?? Really? No explanation of syncing, pushing your changes. No git commands. No examples. This is not "all". This is "blah".

  • @user-uh2cr9so8l
    @user-uh2cr9so8l 3 ปีที่แล้ว

    If you make changes to the code in the submodule, and then changes are made in the main repo, can you merge the changes from the main into the sub without overwriting your own changes?

  • @gi_ba8539
    @gi_ba8539 6 ปีที่แล้ว

    Thank you

  • @DataJuggler
    @DataJuggler 5 ปีที่แล้ว +1

    This will not work for me because the sub modules are my own code and I need both to be updated.

  • @RichardBronosky
    @RichardBronosky 2 ปีที่แล้ว

    3:00 That's really NOT all that there is. You never address how to handle your changes to files in a submodule.

  • @jpbefx
    @jpbefx 2 ปีที่แล้ว

    I'm too new. I did not understand any of this. LOL.

  • @HighEndDigitalArchitect
    @HighEndDigitalArchitect 5 ปีที่แล้ว +1

    Blah but gives some intro :D

  • @SpookHam
    @SpookHam 2 ปีที่แล้ว

    Cool video explaining the concept but it is NOT a TUTORIAL.

  • @SF-zm2py
    @SF-zm2py 4 ปีที่แล้ว

    This video didn't include any information on the command 'git submodule' nor its features - nor did it show anything about how it works using git's GUI (though personally I don't use that, so I wouldn't know if it has that feature available). That'll be a thumbs down from me.

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

      👋🏼Thanks for taking the time to comment. This video is meant to discuss the submodule conceptually, which is why it does not cover any commands. However, I'll make a note of this for future video topics 📝

    • @SF-zm2py
      @SF-zm2py 4 ปีที่แล้ว

      @@GitKraken Thank you for taking this into consideration.

  • @ShampooWow
    @ShampooWow 7 ปีที่แล้ว

    Awesome video! I like it