Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion getting-started/git-boot-camp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
Loading