git-subtree icon indicating copy to clipboard operation
git-subtree copied to clipboard

Docs: Re-integrate an already extracted subtree that still exists in the source

Open sun opened this issue 14 years ago • 0 comments

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:

  1. You have an original/mainline repo that contains some library code that could be extracted into its own public repo.
  2. 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.
  3. You realize that git-subtree exists. (d'oh!) You want to use it in the future.
  4. 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.
  5. 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

sun avatar Dec 15 '11 02:12 sun