git-subtree
git-subtree copied to clipboard
Docs: Re-integrate an already extracted subtree that still exists in the source
Note: I've absolutely no idea whether this is correct, or whether it's totally superfluous. Please comment accordingly. Feedback welcome!
Note: This is based on the sun:docs branch. Merge that first.
Use-case being:
- You have an original/mainline repo that contains some library code that could be extracted into its own public repo.
- You extract the library code from mainline using common/usual commands to perform the task [1], which means you have two repos that contain the history of the library now.
- You realize that git-subtree exists. (d'oh!) You want to use it in the future.
- You want to merge any upstream changes in the library back into the mainline, and also merge any (future) changes to the library in the mainline to the upstream library.
- To execute 4. you follow the commands outlined in the added example for re-integrating an already extracted subtree that still exists in the source (mainline).
[1] http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository