Skip to content

Commit 16eeda0

Browse files
committed
add command for powershell
1 parent 99e8ba5 commit 16eeda0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

getting-started/git-boot-camp.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,19 @@ If you don't have GitHub CLI or hub installed, you can set up a git alias:
461461
462462
$ git config --global alias.pr '!sh -c "git fetch upstream pull/${1}/head:pr_${1} && git checkout pr_${1}" -'
463463
464-
.. tab:: Windows
464+
.. tab:: Windows cmd
465465

466466
.. code-block:: dosbatch
467467
468468
git config --global alias.pr "!sh -c 'git fetch upstream pull/${1}/head:pr_${1} && git checkout pr_${1}' -"
469469
470+
.. tab:: Windows Powershell
471+
472+
.. code-block:: shell
473+
474+
git config --global alias.pr '!f() { git fetch upstream pull/$1/head:pr_$1 && git checkout pr_$1; }; f'
475+
476+
470477
The alias only needs to be done once. After the alias is set up, you can get a
471478
local copy of a pull request as follows::
472479

0 commit comments

Comments
 (0)