From 4089dbf3db61d60cd27a4b944acae75a99e9832a Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Tue, 18 Nov 2025 23:50:45 +0800 Subject: [PATCH 1/4] Update Git alias command for pulling PR branches --- getting-started/git-boot-camp.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/getting-started/git-boot-camp.rst b/getting-started/git-boot-camp.rst index 87177840c..1dee0ba7e 100644 --- a/getting-started/git-boot-camp.rst +++ b/getting-started/git-boot-camp.rst @@ -453,19 +453,26 @@ Both of these tools will configure a remote URL for the branch, so you can ``git push`` if the pull request author checked "Allow edits from maintainers" when creating the pull request. -If you don't have GitHub CLI or hub installed, you can set up a git alias: +If you don't have GitHub CLI or hub installed, you can run the following commands: + +.. code-block:: shell + + $ git fetch upstream pull/NNNNN/head:pr_NNNNN + $ git switch pr_NNNNN + +or set up a Git alias: .. tab:: Unix/macOS .. code-block:: shell - $ git config --global alias.pr '!sh -c "git fetch upstream pull/${1}/head:pr_${1} && git checkout pr_${1}" -' + $ git config --global alias.pr '!sh -c "git fetch upstream pull/${1}/head:pr_${1} && git switch pr_${1}" -' .. tab:: Windows .. code-block:: dosbatch - git config --global alias.pr "!sh -c 'git fetch upstream pull/${1}/head:pr_${1} && git checkout pr_${1}' -" + git config --global alias.pr "!sh -c 'git fetch upstream pull/${1}/head:pr_${1} && git switch pr_${1}' -" 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:: From e6b6f448fc7582e0cf830410b0c66148603fd599 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Wed, 19 Nov 2025 00:02:56 +0800 Subject: [PATCH 2/4] Remove extra whitespace --- getting-started/git-boot-camp.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getting-started/git-boot-camp.rst b/getting-started/git-boot-camp.rst index 1dee0ba7e..6545c8aaf 100644 --- a/getting-started/git-boot-camp.rst +++ b/getting-started/git-boot-camp.rst @@ -459,7 +459,7 @@ If you don't have GitHub CLI or hub installed, you can run the following command $ git fetch upstream pull/NNNNN/head:pr_NNNNN $ git switch pr_NNNNN - + or set up a Git alias: .. tab:: Unix/macOS From 2d9f227ef3241baa3f099f963f0cbcf7d32c1083 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Wed, 19 Nov 2025 16:38:52 +0800 Subject: [PATCH 3/4] Capitalize `Or` at the beginning of the sentence Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- getting-started/git-boot-camp.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getting-started/git-boot-camp.rst b/getting-started/git-boot-camp.rst index 6545c8aaf..33ea613ff 100644 --- a/getting-started/git-boot-camp.rst +++ b/getting-started/git-boot-camp.rst @@ -460,7 +460,7 @@ If you don't have GitHub CLI or hub installed, you can run the following command $ git fetch upstream pull/NNNNN/head:pr_NNNNN $ git switch pr_NNNNN -or set up a Git alias: +Or set up a Git alias: .. tab:: Unix/macOS From 56b6b260bc4e57436c37d695a853077f8ae438b0 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Wed, 19 Nov 2025 22:13:35 +0800 Subject: [PATCH 4/4] Rephrase sentence --- getting-started/git-boot-camp.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getting-started/git-boot-camp.rst b/getting-started/git-boot-camp.rst index 33ea613ff..f2dbd730e 100644 --- a/getting-started/git-boot-camp.rst +++ b/getting-started/git-boot-camp.rst @@ -453,7 +453,7 @@ Both of these tools will configure a remote URL for the branch, so you can ``git push`` if the pull request author checked "Allow edits from maintainers" when creating the pull request. -If you don't have GitHub CLI or hub installed, you can run the following commands: +Otherwise, you can run the following commands: .. code-block:: shell