Skip to content

Instantly share code, notes, and snippets.

@BolajiAyodeji
Created June 29, 2023 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BolajiAyodeji/ae7771e237a71ac952b0816f35c4aa78 to your computer and use it in GitHub Desktop.
Save BolajiAyodeji/ae7771e237a71ac952b0816f35c4aa78 to your computer and use it in GitHub Desktop.
Bundle repository with all git history into another.
  1. Bundle the source repository:
git bundle create repo-name.bundle --all
  1. Move repo-name.bundle into the target directory.

  2. In the target directory, import the repo-name.bundle file.

git bundle unbundle repo-name.bundle
  1. You can now merge/rebase/cherry-pick your desired source commits into the target repository.

  2. Alternatively, pull everything:

git pull repo-name.bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment