A development-safe automated synchronization template for keeping GitHub repositories in sync between your development machine, travel server, and GitHub - regardless of network location.
π― Use this template to create your own customized sync solution in minutes!
- π‘οΈ Safety First: Never overwrites uncommitted work or active development
- π Network Agnostic: Works on university, home, mobile, VPN networks automatically
- β‘ One-Click Setup: Automated installation scripts for all dependencies
- π§ Fully Customizable: Easy configuration for your repositories and network
- π Professional Monitoring: Comprehensive logging and status reporting
- π Production Ready: Used in real development workflows
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Development β β GitHub β β Travel Server β
β Machine βββββΊβ Repositories βββββΊβ (Any Linux) β
β β β β β β
β Windows/macOS/ β β Source of β β Raspberry Pi β
β Linux β β Truth β β ZimaBoard, etc. β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β² β² β²
β β β
Auto-discovery Safety checks Systemd
Network patterns Before every sync automation
# Use this template to create your own repository
# Click "Use this template" button on GitHub, or:
gh repo create my-sync-solution --template LReyes21/github-travel-sync-template
cd my-sync-solutionChoose your platform and run the appropriate script:
.\setup\install-windows.ps1./setup/install-macos.sh./setup/install-linux-desktop.sh./setup/install-linux-server.sh# Copy and edit configuration templates
cp config/laptop-config.example.ps1 config/laptop-config.ps1
cp config/server-config.example.sh config/server-config.sh
# Edit with your GitHub username, repositories, and server details
nano config/laptop-config.ps1 # Windows/macOS users
nano config/server-config.sh # Server configuration# Install on your development machine
./scripts/auto-sync-safe.ps1 -Install # Windows
./scripts/auto-sync-safe.sh -install # Linux/macOS
# Install on your server
scp -r . user@yourserver:~/sync-setup/
ssh user@yourserver "cd sync-setup && sudo ./setup/install-linux-server.sh"This template includes automated setup scripts that install all required dependencies:
- PowerShell 5.1+ (included in Windows 10+)
- Git for Windows
- GitHub CLI
- OpenSSH Client (Windows 10+)
Auto-install script: setup/install-windows.ps1
- Homebrew package manager
- Git
- GitHub CLI
- SSH client (built-in)
Auto-install script: setup/install-macos.sh
- Bash 4.0+
- Git
- GitHub CLI
- SSH client
- curl/wget
Auto-install script: setup/install-linux-desktop.sh
- Bash 4.0+
- Git
- GitHub CLI
- SSH server/client
- systemd (for automation)
Auto-install script: setup/install-linux-server.sh
Click to expand manual installation instructions
# Install Git for Windows
winget install Git.Git
# Install GitHub CLI
winget install GitHub.cli
# Verify PowerShell version (should be 5.1+)
$PSVersionTable.PSVersion# Install Homebrew if not present
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install dependencies
brew install git gh# Ubuntu/Debian
sudo apt update
sudo apt install git curl
# Install GitHub CLI
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh
# CentOS/RHEL/Fedora
sudo dnf install git ghgithub-travel-sync-template/
βββ README.md # This file
βββ LICENSE # MIT License
βββ CHANGELOG.md # Version history
β
βββ setup/ # Automated installation scripts
β βββ install-windows.ps1 # Windows dependency installer
β βββ install-macos.sh # macOS dependency installer
β βββ install-linux-desktop.sh # Linux desktop installer
β βββ install-linux-server.sh # Linux server installer
β βββ verify-setup.ps1 # Setup verification script
β
βββ scripts/ # Main sync scripts
β βββ auto-sync-safe.ps1 # Windows/PowerShell client
β βββ auto-sync-safe.sh # Linux/macOS client
β βββ server-sync-safe.sh # Server-side sync script
β βββ network-discovery.ps1 # Network discovery utilities
β
βββ config/ # Configuration templates
β βββ laptop-config.example.ps1 # Client configuration template
β βββ server-config.example.sh # Server configuration template
β βββ repositories.example.txt # Repository list template
β βββ ssh-config.example # SSH configuration example
β
βββ systemd/ # Linux service definitions
β βββ github-sync.service # Systemd service
β βββ github-sync.timer # Systemd timer
β
βββ docs/ # Documentation
β βββ SETUP-GUIDE.md # Step-by-step setup
β βββ TROUBLESHOOTING.md # Common issues
β βββ CUSTOMIZATION.md # Advanced customization
β βββ EXAMPLES.md # Real-world examples
β
βββ examples/ # Example configurations
βββ university-setup/ # University network example
βββ home-office/ # Home office setup
βββ mobile-developer/ # Mobile developer setup
- β Uncommitted changes - Modified files not yet committed
- β Untracked files - New files not added to Git
- β Recent activity - Files modified in configurable time window
- β Merge operations - Active merge conflicts or rebases
- β Stashed changes - Work saved in Git stash
- β Branch state - Prevents sync during branch operations
- π Pre-sync analysis of every repository
- π Detailed status reporting on what's safe vs. risky
β οΈ Clear warnings when sync is skipped- π¨ Force override available when needed
- π Comprehensive logging of all operations
# config/laptop-config.ps1
$GitHubUser = "YourUsername"
$Repos = @("repo1", "repo2", "repo3")
$ServerPatterns = @("server.local", "192.168.1.100")# Add your network patterns
$ServerPatterns = @(
"myserver.local", # mDNS/Bonjour
"myserver.university.edu", # University network
"myserver.company.com", # Work VPN
"192.168.1.100", # Home network
"10.0.0.100" # Custom network
)$SafetySettings = @{
RecentActivityThresholdMinutes = 30 # Adjust sensitivity
ForceOverride = $false # Allow/disallow force sync
BackupBeforeSync = $true # Enable automatic backups
}- Development Machine: University lab workstation
- Travel Server: Raspberry Pi in dorm room
- Sync: Research code, papers, and data analysis scripts
- Networks: Campus WiFi, dorm ethernet, library connections
- Development Machine: Home office laptop
- Travel Server: ZimaBoard portable server
- Sync: Client projects, personal tools, configuration files
- Networks: Home WiFi, coffee shop hotspots, client offices
- Development Machine: MacBook for development
- Travel Server: Mini PC in RV/hotel
- Sync: Portfolio projects, client work, backup repositories
- Networks: Mobile hotspot, campground WiFi, coworking spaces
// .vscode/tasks.json
{
"label": "Sync Repositories",
"type": "shell",
"command": "./scripts/auto-sync-safe.ps1",
"args": ["-Sync"],
"group": "build"
}#!/bin/bash
# .git/hooks/pre-push
./scripts/auto-sync-safe.sh --pre-push-check# For systems without systemd
*/120 * * * * /path/to/scripts/auto-sync-safe.sh --cron./setup/verify-setup.ps1 # Windows
./setup/verify-setup.sh # Linux/macOS./scripts/network-discovery.ps1 --test./scripts/auto-sync-safe.ps1 --dry-runThis is a template repository! Contributions help everyone:
- Fork this template
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- π§ Additional platform support
- π± Mobile device integration
- π Enhanced security features
- π Monitoring and alerting
- π¨ UI/dashboard development
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Documentation: docs/
- π§ Contact: Create an issue for support requests
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the need for reliable development synchronization across diverse network environments
- Built for developers who work from anywhere with any device
- Designed with safety and simplicity as core principles
- Use this template to create your repository
- Run the setup script for your platform
- Configure your repositories and server details
- Deploy and enjoy seamless synchronization everywhere!
Made with β€οΈ for developers who code everywhere.