MarkLodato / visual-git-guide

A visual guide to git.
http://marklodato.github.io/visual-git-guide/
1.33k stars 311 forks source link

Add git subtree to commands #55

Open HybridDog opened 7 years ago

HybridDog commented 7 years ago

With git subtree you can extract a repository from another one and the other way round. When you for example have a library from somewhere added to the repository and gradually added changes but then the original library gets some updates, you don't need to circuitously merge the updates manually. You can use git subtree to extract your version with all the related history, then rebase the extracted repository to the original one and after update the library to the extracted one with git subtree.

memowe commented 7 years ago

Thanks for mentioning subtree, I used to work with submodules but never saw subtree. However, I would appreciate a definition of @MarkLodato regarding what commands are important enough to be discussed here, as I don't see sub(modules|trees) in every day git use.