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.