0

I have a git repo with a subfolder that was forked from another repo. The folder was simply copied over and not linked with git submodule.

Since using it, the subfolder has had some commits made to it and diverged from the upstream.

How do I connect this subfolder to the upstream as a submodule and keep the divergent commit as a rebase?

mugetsu
  • 4,228
  • 9
  • 50
  • 79
  • 2
    Does this answer your question? [Detach (move) subdirectory into separate Git repository](https://stackoverflow.com/questions/359424/detach-move-subdirectory-into-separate-git-repository) – mkrieger1 Oct 29 '21 at 17:02
  • @mkrieger1 I can see how subtree might be a better choice, but I still need some help doing it on a local subfolder that has already diverged from the source – mugetsu Oct 29 '21 at 17:10
  • 1
    What wrongs to put the diverge commit to a dedicated branch to prepare the extraction ? – Ôrel Oct 29 '21 at 19:00

0 Answers0