Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8381487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:42:41+00:00 2026-06-09T16:42:41+00:00

I need to export a git repository content and import it in a target

  • 0

I need to export a git repository content and import it in a target repository. I know of two alternatives to do it, but they do not solve my problem

a) Add the source repository as a remote and do a merge to the target. I cannot use this as both repositories are not on the same network

b) Use git archive and copy the contents to the target. In this git archive the revision info is lost.

I need something that does an archive along with the version history and enables me to merge in the target. How can this be done?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:42:43+00:00Added an answer on June 9, 2026 at 4:42 pm

    git bundle is provided for this exact purpose.

    Example:

    1. Bundle your source repository in its entirety

      git bundle create my_repo.bundle --all

    2. Take “my_repo.bundle” to where your target is

    3. From your target, load up your source commit objects

      git bundle unbundle my_repo.bundle

      …from which point you can merge/rebase/cherry-pick your desired source commits into your target repository to your heart’s content.

      Otherwise, pulling works just the same:

      git pull my_repo.bundle

    Compared to cloning, bundles are easier to transfer because they’re smaller as your files aren’t carried in their checked out state.

    Other reasons for using bundle:

    • Unlike using clone --bare (which doesn’t checkout your files),
      bundles are created and packed as a single file so you don’t need
      additional compressing/tarballing.

    • You could also simply tarball your source repository (or just the
      .git directory), but you’ll be carrying over all the excess cache and
      garbage that builds up under .git/.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I made a dll in c# but i need to export the functions. Is
I need to export to an archive a set of commits in a git
I need to export data from a table in database A, then import it
I need to export my checked-in codebase on the production server, but need to
I need to export the data and structure of a table but the data
I'm trying to combine code on two branches with the 'git merge' command, but
I've been learning git on a need to know basis over the last several
Need to export and import a sheet from my workbook using VBA. What's the
I need to export csv file in php using mysql query .But when i
I need to export a subset of an Oracle table and import it in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.