gitconfig: Change "fetch-pr" alias to "checkout-pr"
This commit is contained in:
parent
9f0236db3a
commit
779b9b5a6f
|
|
@ -62,5 +62,5 @@
|
||||||
# Submodule helpers
|
# Submodule helpers
|
||||||
sm-update = submodule update --init --recursive --remote --merge
|
sm-update = submodule update --init --recursive --remote --merge
|
||||||
|
|
||||||
# Fetch a branch from a pull request (supported by GitHub)
|
# Checkout a branch from a pull request (supported by GitHub)
|
||||||
fetch-pr = "!f() { [ $# -eq 2 ] || { echo 'Usage: git fetch-pr PULL_REQUEST_ID BRANCH_NAME'; exit 1; }; git fetch origin pull/$1/head:$2; }; f"
|
checkout-pr = "!f() { [ $# -ge 1 ] || { echo 'Usage: git fetch-pr PULL_REQUEST_ID [BRANCH_NAME]'; exit 1; }; BRANCH=${2-pull-request-$1}; git fetch origin pull/$1/head:$BRANCH && git switch $BRANCH; }; f"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue