Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



I 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.


My 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.


What's the hash of a branch?


It uses the branch name instead of the hash.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: