#!/bin/bash # Run this on each developer's machine # Usage: cd tianpu-ems && bash path/to/04_update_developer_remotes.sh echo "=== Updating Git remotes to labmac3 ===" OLD_ORIGIN=$(git remote get-url origin 2>/dev/null) echo "Current origin: $OLD_ORIGIN" # Update origin to labmac3 git remote set-url origin http://192.168.1.77:3300/tianpu/tianpu-ems.git # Keep old Mac Studio as backup remote git remote remove mac-studio 2>/dev/null git remote add mac-studio "$OLD_ORIGIN" 2>/dev/null NEW_ORIGIN=$(git remote get-url origin) echo "New origin: $NEW_ORIGIN" # Test connectivity echo "" echo "Testing connection..." git ls-remote origin HEAD 2>&1 | head -3 echo "" echo "=== Done ===" echo "You can now: git pull origin main"