git subtree tutorial and demo!

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.พ. 2015
  • How to get going with git subtrees! The video is ~15 minutes, but if you are proficient in git you can watch at 1.5x speed.
    I've not seen all of this demonstrated in any other video including
    1) adding a subtree
    2) pushing and pulling from both sides
    3) switching the branch of a subtree in the parent repo
    There are some decent articles but several have typos and thus the commands don't actually work.
    Video notes and reference links are here: artemis.atlassian.net/wiki/di...
  • แนวปฏิบัติและการใช้ชีวิต

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

  • @michaelbaumer1325
    @michaelbaumer1325 4 หลายเดือนก่อน

    Very well explained - still helpful in 2024. Thanks!

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

    You probably just saved me some serious time. Thank you.

  • @benna100
    @benna100 8 ปีที่แล้ว +1

    Awesome thanks, just what i needed. Well explained

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

    Thank you so much. Still usefull in 2022

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

    Thank you very much for this gem!

  • @matheuspatury
    @matheuspatury 8 ปีที่แล้ว +1

    Thanks! Very informative

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

    Thank you for making a video like. Makes it super easy to understand. Huzzah

  • @PrakashPatelOnly
    @PrakashPatelOnly 5 ปีที่แล้ว

    Thanks for this details explanation of subtree video. I have question about changing to new branch of subtree. Once i delete existing subtree folder from main repo and commit it. Do i need to push that commit to main repo or subtree repo?

  • @acsllinas
    @acsllinas 8 ปีที่แล้ว +1

    Thanks a lot

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

    Anyone have this problem? When I push my subtree changes in the parent repo, the history of the parent repo gets added to the subtree's repo

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

    Hello @artemissoftwarenet Thanks for this video but i want to ask you that will it be possible to use this subtree feature without using terminal as many developers are ui addicted.

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

    Cool video. Dos sourcetree not really support subtree? I have tried, but it does not seem to work properly.

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

    Thanks a lot for this video, but there are some mistakes, i tested the commands and i noticed that git remote add doesn't have "--squash" option. Thanks

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

      Thanks for checking it out. You're right that in the text there is an extra --squash on the git remote line. Looks like I did a copy/paste and overlooked removing that. However the commands all typed into the command line in the demo are accurate for the version of git I was working with I believe.

  • @acsllinas
    @acsllinas 8 ปีที่แล้ว

    What about if you only want to add a directory of your child repository ?

    • @bpatters7
      @bpatters7 8 ปีที่แล้ว +1

      Hi! I think you might want to look at git submodules (which seemed a little less intuitive to me personally). I don't actually know the answer but stackoverflow seems to? Hope that and the link below help!
      stackoverflow.com/questions/11834386/cloning-only-a-subdirectory-with-git

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

      git clone

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

    The way shown in this video may not be what you want. If you do not want the subtrees logs polluting your main project's log then you might try using: git subtree add --squash --prefix=myShared remoteRepoWithSharedCode.git master See community.atlassian.com/t5/Questions/How-can-one-eliminate-subtree-commit-history-due-to-a-remote/qaq-p/76357 for more information on the difference.