Skip to content

Can someone explain the difference between Submodules and Remotes? #22550

Discussion options

You must be logged in to vote

They’re actually very different.

Remotes are names that you give to remote locations where the repository is stored. So when you clone a repository from GitHub to your local machine, the repository on GitHub is given a remote named origin in your local repository. This allows you to fetch, push, or pull your changes between your local repository and the copy that is stored on GitHub.

Submodules are for when you need to compose some other repository inside the main repository. For example, you’re working on a project that does some amazing thing. Then you create some library for this project that you want to store in a separate repository. You would create a separate repository for the lib…

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
2 participants