File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ GITHUB_URL=" git@github.com:tolik518/strong-api-workout-sync.git"
5+ TANGLED_URL=" git@tangled.org:tolik518.tngl.sh/strong-api-workout-sync"
6+
7+ # Ensure we are inside a git repo
8+ git rev-parse --is-inside-work-tree > /dev/null
9+
10+ # Ensure origin exists
11+ if ! git remote get-url origin > /dev/null 2>&1 ; then
12+ git remote add origin " $GITHUB_URL "
13+ else
14+ # Use GitHub as the default fetch/pull source
15+ git remote set-url origin " $GITHUB_URL "
16+ fi
17+
18+ # Remove old/duplicate push URLs if present
19+ git remote set-url --delete --push origin " $GITHUB_URL " 2> /dev/null || true
20+ git remote set-url --delete --push origin " $TANGLED_URL " 2> /dev/null || true
21+
22+ # Add both push targets
23+ git remote set-url --add --push origin " $GITHUB_URL "
24+ git remote set-url --add --push origin " $TANGLED_URL "
25+
26+ echo " Configured remotes:"
27+ git remote -v
You can’t perform that action at this time.
0 commit comments