How do I push / pull a set of commands from a standalone machine to a server?

A software project I'm working on recently migrated from ClearCase to Git. I'm still learning the basics, so this question can be resolved later when I'm more familiar with Git and its capabilities.

My question is this: Does Git have a good workflow mechanism for a development machine that cannot connect to the central repository (i.e. no network connection)?

More details

We have our centralized Git repository / server in our office (Location A). Most developers will be able to connect directly to the server, whether through a local network in the office or through a VPN. The security policy for this project does not allow direct ssh / https connections to the server from outside the local network - everything must go through the VPN in this case.

The developer on the team transitions to onsite work at the customer's site (Site C). The developer will be working on a development machine at location C, which is offline only, and data can be transferred to and removed from the machine using media (CD or DVD). The developer will need to have a branch or two of code on a stand-alone machine as he will perform bug fixes, prototyping capabilities for the client, and act as an on-line spokesperson for the project.

The developer will also have a machine at home (location B) where he can connect to location A using a VPN and push / pull from the central repo. We tested this and it works great.

We are trying to determine if the repository can be updated on the machine in the Location C field using DVDs. The current repository is the source of ~ 1.6GB and 3GB of third party binaries (we haven't broken it yet due to the sheer amount of interconnects between different modules, this is the R&D codebase from 25 years earlier). After the initial cloning, in order to update / pull the changes, do we need to burn the entire source to disk or use patches / archives to make it more efficient? If possible, I would like to keep the history on the machine in Location C transparently (I know that applying a patch makes a commit for it, but I don't believe it fetches the entire commit history for every item in the patch).

We will also need to go in the opposite direction (hence my desire to preserve history). Fixed bugs / features need to be checked back into the central repository and the only way to export the data is via DVD. Do we need to write the entire repository to disk, or can we only do this via diffs? Keeping version history is less important in this case, but I would like to maintain it if possible.

We are currently testing various methods (Git only lives about 3 business days for us), so I am missing "what we tried". I would like someone to do this or do something similar to this and collect any recommendations of workflows, tools, etc. to make this easier. In an ideal world, when we have a repository set up in Location C, I would like to have small updates (only changes since last push) available via CD / DVD for the developer.

Features . The developer will be Windows 7 x64, the Central Repository is Atlassian Stash, the team usually uses SourceTree (but the developer is looking into Bash commands for Git to really figure it out). We are open to running scripts,

I looked at this question and it hints that patch files are the way to go; however, the requirements are different.

+3


source to share


1 answer


You can pin the .git folder and move it somewhere else (like burn to DVD). This will allow you to get the source code inside.

You can use the command git bundle

to create what is essentially an offline push that you need to get your updates back. https://git-scm.com/blog/2010/03/10/bundles.html explains in detail how to do it and has this introduction:



So the scenario is: you need sneakernet git push. Maybe your network is down and you want to send changes to your employees. Perhaps you are working somewhere on site and do not have access to the local network for security reasons. Perhaps your wireless / ethernet card is just broken. Perhaps you don't have access to the shared server for the moment, you want to send someone an email message, and you don't want the transfer of 40 to be completed with format-patch.

Enter git package. The bundle command packs anything that would normally be pushed over the wire using git push into a binary that you can email or sneakernet and then split into another repository.

"sneakernet" is slang for "moving files between computers on foot (wearing sneakers)" and a pun on "ethernet".

+8


source







All Articles