-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kenji Miyake <[email protected]>
- Loading branch information
Kenji Miyake
committed
Mar 9, 2022
1 parent
c1a6959
commit c27a37c
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Tips | ||
|
||
This page introduces tips around pull requests or reviews. | ||
|
||
## Toggle annotations or review comments in the diff view | ||
|
||
There will be some annotations or review comments in the diff view during your review. | ||
|
||
Press the `A` key to toggle annotations. | ||
|
||
Before: | ||
|
||
![before-press-a](images/before-press-a.png) | ||
|
||
After: | ||
|
||
![after-press-a](images/after-press-a.png) | ||
|
||
Also, press the `I` key to toggle review comments. | ||
|
||
Refer to [GitHub Docs](https://docs.github.com/en/get-started/using-github/keyboard-shortcuts) for other keyboard shortcuts. | ||
|
||
## View code in the web-based Visual Studio Code | ||
|
||
You can open `Visual Studio Code` from your browser to view code in a rich UI. | ||
Press the `.` key on any repository or pull request. | ||
|
||
Refer to [github/dev](https://github.com/github/dev) for more detailed usage. | ||
|
||
## Check out the branch of a pull request quickly | ||
|
||
If you want to check out the branch of a pull request, it's generally troublesome with the fork-and-pull model. | ||
|
||
```bash | ||
# Copy the user name and the fork URL. | ||
git remote add {user-name} {fork-url} | ||
git checkout {user-name}/{branch-name} | ||
git remote rm {user-name} # To clean up | ||
``` | ||
|
||
Instead, you can use [GitHub CLI](https://cli.github.com/) to simplify the steps, just run `gh pr checkout {pr-number}`. | ||
|
||
You can copy the command from the top right of the pull request page. | ||
|
||
![gh-pr-checkout](images/gh-pr-checkout.png) |