File size: 344 Bytes
0daf510
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash
set -euo pipefail

BR=${1:-$(git rev-parse --abbrev-ref HEAD)}
echo "[sync] Pushing branch ${BR} to remotes (gh, hf)"

if git remote get-url gh >/dev/null 2>&1; then
  git push gh "$BR" || echo "[sync] GH push failed"
fi
if git remote get-url hf >/dev/null 2>&1; then
  git push hf "$BR" || echo "[sync] HF push failed"
fi