How to push commits to a remote Git repository which is separated by an air gap? -


my team , work on different networks. don't have internet connection nor share same network. way can transfer files using thumbdrives.

the way can commit remote git repository if use colleague's computer has network access git server. commands have run me fetch, merge, push commits onto computer, short of transferring entire working directory over?

like, transfer commits remote server lacks.

edit: forgot mention thumbdrive might wiped periodically part of security measures. remote repo on thumbdrive still pretty idea though!

you can setup git remote on filesystem, assume if mount thumbdrive on machine add repo remote , merge in changes

# mount thumbdrive # add remote filesystem git remote add cardin_usb /volumes/myusb # or whatever usb path  # pull in changes git fetch cardin_usb # merge branches per normal eg git checkout master git merge cardin_usb/my_feature 

edit - read want changes only. generate patches if know last commit remote server has:

git format-patch lastservercommit^..head --stdout > new_changes.patch 

then transfer via usb, , coworker can submit.


Comments