- Bundle the source repository:
git bundle create repo-name.bundle --all
-
Move
repo-name.bundle
into the target directory. -
In the target directory, import the
repo-name.bundle
file.
git bundle unbundle repo-name.bundle
-
You can now merge/rebase/cherry-pick your desired source commits into the target repository.
-
Alternatively, pull everything:
git pull repo-name.bundle