From 16eeda072a82fc536cf954f65ea1b7825c2ff808 Mon Sep 17 00:00:00 2001 From: Bonu Krishna Chaitanya Date: Thu, 9 Oct 2025 16:43:27 +0530 Subject: [PATCH] add command for powershell --- getting-started/git-boot-camp.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/getting-started/git-boot-camp.rst b/getting-started/git-boot-camp.rst index 87177840c..9a947d4e2 100644 --- a/getting-started/git-boot-camp.rst +++ b/getting-started/git-boot-camp.rst @@ -461,12 +461,19 @@ If you don't have GitHub CLI or hub installed, you can set up a git alias: $ git config --global alias.pr '!sh -c "git fetch upstream pull/${1}/head:pr_${1} && git checkout pr_${1}" -' -.. tab:: Windows +.. tab:: Windows cmd .. code-block:: dosbatch git config --global alias.pr "!sh -c 'git fetch upstream pull/${1}/head:pr_${1} && git checkout pr_${1}' -" +.. tab:: Windows Powershell + + .. code-block:: shell + + git config --global alias.pr '!f() { git fetch upstream pull/$1/head:pr_$1 && git checkout pr_$1; }; f' + + The alias only needs to be done once. After the alias is set up, you can get a local copy of a pull request as follows::