Git: Move files from one repo to another with history (2021) vivekdhami.com 24 points by transpute 14 hours ago
precompute 7 hours ago Here's an dirtier and easier way to do this:git -C {source_repo} format-patch -{number of commits} HEAD --stdout -- {absolute folder/file path(s)} > /tmp/new.patchgit -C {target_repo} am < /tmp/new.patchThis will "stack" all these commits on top of HEAD.
Here's an dirtier and easier way to do this:
git -C {source_repo} format-patch -{number of commits} HEAD --stdout -- {absolute folder/file path(s)} > /tmp/new.patch
git -C {target_repo} am < /tmp/new.patch
This will "stack" all these commits on top of HEAD.