Skip to content

Instantly share code, notes, and snippets.

View ClobberXD's full-sized avatar
ℹ️
Unavailable... forever

ANAND ClobberXD

ℹ️
Unavailable... forever
  • India
View GitHub Profile
@SmallJoker
SmallJoker / pr_apply.sh
Last active August 24, 2025 12:09
Applies PRs to any repository. Place into ~/.local/bin and run in the target git directory
#!/usr/bin/env bash
remote="upstream"
url=$(LANG=C git remote -v get-url $remote 2>&1)
if [[ "$url" == fatal* || "$url" == error* ]]; then
remote="origin"
url=$(LANG=C git remote -v get-url $remote 2>&1)
fi
if [[ "$url" == fatal* || "$url" == error* ]]; then