0

I have two repository, one is a bit outdated, but I use both during the development. (It has historical reason to do so, but it doesn't matter.)

I have a sub-directory which is an almost independent part of the project, a small application. I would like to update only this tool's directory from the newer repo. Practically, I need the same version from this application in the top of both repo.

Is there any way to move only the application related commits to the other repository?

The commits are not in a "straight line", I had tons of commits and some of them were patch for this application.

Maybe somehow with cherry-pick?

Steve M. Bay
  • 313
  • 1
  • 3
  • 15

1 Answers1

0

It sounds like you should move the sub-directory to a separate repository. This will be a better solution in the long run.

Otherwise a workaround would be...

  • Checkout good commit in repo 1
  • Checkout repo 2
  • Copy sub-directory from repo 1 to repo 2
  • Commit repo 2
  • Tag repo 2 with reference to what version of the sub-directory you integrated.
Martin G
  • 17,357
  • 9
  • 82
  • 98