2 ms·
> a submodule is always included at a particular commit Actually you can make a submodule track a branch instead of a specific commit. I've never seen anyone a
by IshKebab 2y ago
> a submodule is always included at a particular commit
Actually you can make a submodule track a branch instead of a specific commit. I've never seen anyone actually do that though and it seems like a bad idea. Though I did work for a while for a company that had written a custom tool that worked like that and we never ran into any problems due to it.
- eru 2y agoWhat's the hash of a branch?
- IshKebab 2y agoIt uses the branch name instead of the hash.
- AceJohnny2 2y agoI don't think it is possible to put a branch name into a tree object, not without deep modifications to git, so I suspect your previous company developed a significantly different tool around it.
- IshKebab 2y agoMy previous company wasn't using native Git submodules. I think you're right actually the submodules. You can associate a submodule with a specific branch, but it still records the hash like normal and you still have to manually update it.