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

  • Home
  • SEARCH
  • 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 1039409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:05:46+00:00 2026-05-16T15:05:46+00:00

I need to keep my development trees in sync on different computers, with no

  • 0

I need to keep my development trees in sync on different computers, with no network connection between them.

We have a central git repository, and I normally work on my own clone on my office computer. Sometimes I need to do some development on another computer, which is never connected to the office network. None of the computers are ever connected to Internet. Development may be performed on both computers between synchronizations.

I have read the help pages for git-bundle, which seems like the best tool, but I am not really sure how a good workflow could be set up.

Can you give me some advice or pointers?

  • 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-05-16T15:05:46+00:00Added an answer on May 16, 2026 at 3:05 pm

    Bundles!

    The workflow with git bundle is going to be essentially the same as any other workflow. This may not seem like terribly helpful advice, but here it is: use whatever workflow you would normally use, and replace “push/pull” with “carry a bundle here to there on a flash drive, then pull”.

    The man page actually has a pretty good walkthrough for getting going with this, although it’s more of a one-way example. For the sake of completeness, here’s a slightly modified version of it, showing how to move information both ways:

    # on hostA, the initial home of the repo
    hostA$ git bundle create hostA.bundle --branches --tags
    
    # transfer the bundle to hostB, and continue:
    hostB$ git clone /path/to/hostA.bundle my-repo
    # you now have a clone, complete with remote branches and tags
    # just to make it a little more obvious, rename the remote:
    hostB$ git remote rename origin hostA
    
    # make some commits on hostB; time to transfer back to hostA
    # use the known master branch of hostA as a basis
    hostB$ git bundle create hostB.bundle ^hostA/master --branches --tags
    
    # copy the bundle back over to hostA and continue:
    hostA$ git remote add hostB /path/to/hostB.bundle
    # fetch all the refs from the remote (creating remote branches like hostB/master)
    hostA$ git fetch hostB
    # pull from hostB's master, for example
    hostA$ git pull
    
    # make some commits on hostA; time to transfer to hostB
    # again, use the known master branch as a basis
    hostA$ git bundle create hostA.bundle ^hostB/master --branches --tags
    # copy the bundle to hostB, **replacing** the original bundle
    # update all the refs
    hostB$ git fetch hostA
    
    # and so on and so on
    

    The key thing to notice is that you can add a bundle as a remote, and interact with it just as you would with any other remote. To update that remote, just drop in a new bundle, replacing the previous one.

    I’ve also taken a slightly different approach to picking a basis. The man page uses tags, always kept up to date with the last refs which were transferred to the other host. I’ve simply used the remote branches, which will refer to the last refs transferred from the other host. It’s a little bit inefficient; you’ll end up bundling more than you need to, since it’s one step behind. But flash drives are big, bundles are small, and using the refs you already have instead of having to take an extra step and be careful about tags saves a lot of effort.

    The one thing that makes bundles a bit of trouble is that you can’t push to them, and you can’t “rebase” them. If you want the bundle based on a new basis, you have to recreate it. If you want new commits in it, you have to recreate it. This hassle gives rise to my next suggestion…

    Repo on a thumb drive

    Honestly, unless your repo is really big, this might be just as easy. Put a bare clone on a thumb drive, and you can push to and pull from it from both computers. Treat it like your network connection. Need to transfer to the central repo? Plug it in!

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

Sidebar

Ask A Question

Stats

  • Questions 517k
  • Answers 517k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have a look at this SO thread. Few choices for… May 16, 2026 at 7:49 pm
  • Editorial Team
    Editorial Team added an answer why don't you move your code from viewDidLoad into a… May 16, 2026 at 7:49 pm
  • Editorial Team
    Editorial Team added an answer Using match templates you can do the following: <?xml version="1.0"… May 16, 2026 at 7:49 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have set up a SVN repository on a development that contains a website.
I have an application where I need to use 'Basic Authentication'; however, in order
I'm currently playing around with Scala development, but I need to integrate with libraries
I have an exam tomorrow in Advanced Development, but I am stuck on the
How do you work? More specifically, how do you keep your programming tasks organized.
I've been getting my hands dirty lately working on development for the iPhone. Development
I'm fairly new to iPhone development and I've hit a roadblock in my understanding
I'm still fairly new to ASP.NET development so bear with me. I'm going to
I use Linux as primary OS. I need some suggestions regarding how should I
Doing some client-side JavaScript development, which requires me to call a client-side API which

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.