Git · Senior · Question 18 of 76

Submodule vs subtree: what's the key trade-off?

Explanation

Submodules keep histories separate but require extra commands from everyone. Subtree merges the other project's files into your history, so clones just work, but syncing back upstream is harder.

Further reading

Problem with a question

Git · Senior · question 18

Test yourself

Take the Git · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz