Last active
June 4, 2025 10:29
-
-
Save sysrex/c1932d23b4e68116836b06aeb84a0e25 to your computer and use it in GitHub Desktop.
My always used functions.zsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ghpr() { | |
| if [ -z "$1" ]; then | |
| echo "Usage: ghpr <pr-number>" | |
| return 1 | |
| fi | |
| local pr_number=$1 | |
| local branch_name="pr-${pr_number}" | |
| # Fetch the PR from origin | |
| git fetch origin pull/${pr_number}/head:${branch_name} && git checkout ${branch_name} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment