adrianm
adrianm

Reputation: 14726

working with git on not connected computers

I sometimes work in projects where I do development on two computers which are not connected.

A typical example is creating reports in BIDS. The workflow looks like this:

(Sometimes the work starts in customer end)

My question is now what to do when I don't have a vpn or rdp connection. I have a temporary ftp I can use but sometimes USB-stick is the only way.

I have looked into format-patch / am but don't understand how I create the initial repository.

Can I just zip the .git folder and unzip in the other end to get started or is there a better way?

format-patch seem to create one file per commit. Is there an easy way to merge/unmerge these? (It is just me working in the project so I don't branch / rebase)

Github might work in some cases but I don't want to open the can of worms with storing customers data in the cloud.

Upvotes: 1

Views: 79

Answers (1)

Michael Wild
Michael Wild

Reputation: 26341

Yes, you can just copy .git folders around. Once you have two repositories with a common history, you can use git-format-patch and git-am.

But probably better suited for your case is the use of git-bundle. It creates binary bundles that contain the whole history of a branch from which you can fetch and pull. The example in the reference page shows nicely how to use it.

Upvotes: 3

Related Questions