A bash script to synchronize two disconnected repositories via bundle file on a media.
Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
img
LICENSE.md
README.md
git-bundle-synch.sh

README.md

git-bundle-synch

A bash script to synchronize two disconnected repositories via bundle file on a media.

A USB sharing device with git-bundle-synch running

Usage

  • Copy and edit git-bundle-synch.sh
  • Run from git bash '. git-bundle-synch.sh'

What does it do

  • Tries to connect to both repositories to identify which one is accessible
  • Fetches sources from available repository
  • Fetches sources from bundle file on USB-stick (git bundle file is like a zip file with history and all files)
  • Tries to merge these two folders with flag –allow-unrelated-histories so that history is completely preserved
  • If merge succeeds it pushes changes to available repository and recreates bundle
  • If merge fails, you would need to manually resolve conflicts and push

Read more here.

Copyright and license

The license is available within the repository in the LICENSE file.