-
-
Notifications
You must be signed in to change notification settings - Fork 963
Update bootcamp FAQ about "Checking out others' PRs" #1694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
| Otherwise, 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}" -' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
$ git config --global alias.pr '!sh -c "git fetch upstream pull/${1}/head:pr_${1} && git switch pr_${1}" -'
git config --global alias.pr '!sh -c "git fetch upstream pull/${1}/head:pr_${1} && git switch pr_${1}" -'
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most command in the page have the https://devguide.python.org/documentation/style-guide/#code-examples says to use prompts sparingly to differentiate input/output lines, even though it's talking mainly about Python Also note that the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, Console: $ ls | wc -l # good formatting for command + output 👍 158 ls | wc -l # bad formatting for command 👎 Shell: $ ls | wc -l # bad formatting for output 👎 158 ls | wc -l # good formatting for command 👍 |
||
|
|
||
| .. 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:: | ||
|
|
||