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! - วิทยาศาสตร์และเทคโนโลยี
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").
nice tip!
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
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!
A long overdue thanks!!!
your videos are too good, can you please create git specific playlist?
Something comparing submodules with subtrees would be nice.
I totally agree with the pain of git submodules. Regardless of its pain, thank you for the explanation :)
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'?
you generally shouldn't, but yeah you can make changes inside a submodule
Git ! For the totally insane
true true, submodules are wack