2 ms·
Git: Move files from one repo to another with history (2021)
- precompute 1y agoHere'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.