Skip to content

Git and Git Subrepo #22875

Discussion options

You must be logged in to vote

The main repo in folder main would be a standard repository. The folder main/srepo would be what Git calls a submodule. But because submodule working trees within a superproject are tied to a specific commit, you wouldn’t typically develop directly within main/srepo but you would have a srepo project somewhere else that you would develop in and then update the commit that main has to that known-good version.

If you don’t want to have that extra formalism of the submodule, then I would recommend just treating main/srepo as a component that you work on logically separately but isn’t phyisically separated. You could do this by having just one Git repository and working on separate branches t…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants