Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork943
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
hugovk left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
And replace the other twogit checkout on this page withgit switch?
And also ongetting-started/pull-request-lifecycle.rst andindex.rst?
| ..code-block::shell | ||
| $ git config --global alias.pr'!sh -c "git fetch upstream pull/${1}/head:pr_${1} && gitcheckout pr_${1}" -' | ||
| $ git config --global alias.pr'!sh -c "git fetch upstream pull/${1}/head:pr_${1} && gitswitch pr_${1}" -' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| $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}" -' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Most command in the page have the$, even though I don't remember if there was a specific reason/convention, so I didn't remove it. We could remove most/all of them in a separate PR.
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>>>/.... We could remove most/all of them in a separate PR.
Also note that theshell highlight is for shell scripts, whereas theconsole highlight for shell sessions with prompts (seehttps://pygments.org/docs/lexers/#lexers-for-various-shells).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yeah,console is useful when you have a prompt and output to show. Otherwiseshell for plain commands.
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 👍
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
| ..code-block::shell | ||
| $ git config --global alias.pr'!sh -c "git fetch upstream pull/${1}/head:pr_${1} && gitcheckout pr_${1}" -' | ||
| $ git config --global alias.pr'!sh -c "git fetch upstream pull/${1}/head:pr_${1} && gitswitch pr_${1}" -' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Most command in the page have the$, even though I don't remember if there was a specific reason/convention, so I didn't remove it. We could remove most/all of them in a separate PR.
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>>>/.... We could remove most/all of them in a separate PR.
Also note that theshell highlight is for shell scripts, whereas theconsole highlight for shell sessions with prompts (seehttps://pygments.org/docs/lexers/#lexers-for-various-shells).
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
I wanted to pull a PR branch and I was looking up"Checking out others' PRs", and the options were either to install
gh,hub, or creating a Git alias.Since I wanted a less permanent solution, I created this PR to show the commands individually before suggesting adding them as an alias. In addition I replaced
checkoutwith the more modernswitch, and capitalized "Git".Another possible solution is to add the contributor's repo as a remote and fetch their branch from there, but I didn't want to add yet another solution. If people want to add it, we can create another PR.
📚 Documentation preview 📚:https://cpython-devguide--1694.org.readthedocs.build/