Skip to content

Commit 3b37d5b

Browse files
authoredMar 22, 2022
docs: add pr checkout tip section
1 parent 84da5ce commit 3b37d5b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎CONTRIBUTING.md

+12
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Before going any further, make sure you read the [code of conduct](CODE_OF_CONDU
2020
- [From the command line](#from-the-command-line)
2121
- [Push Commits](#push-commits)
2222
- [Create a Pull Request](#create-a-pull-request)
23+
- [PR Checkout Tip](#pr-checkout-tip)
2324
- [Sync your Fork](#sync-your-fork)
2425
- [Syncing with uncommitted changes](#syncing-with-uncommitted-changes)
2526
- [Styleguides](#styleguides)
@@ -192,6 +193,17 @@ Your PR will then be reviewed by the lead developer / other developers. Automate
192193

193194
Once approved and merged, your changes will appear in the `main` branch. It's now time to fast-forward your fork to the source repository. This ensures your fork main branch is in sync with the source main branch...
194195

196+
### PR Checkout Tip
197+
198+
It's possible to checkout the source code as it would be if the PR was merged with the target branch:
199+
200+
```sh
201+
git checkout -f -B <NEW_BRANCH> refs/pull/<PR_NUMBER>/merge
202+
```
203+
204+
- Replace `<NEW_BRANCH>` with a some name that won't conflict with your existing branches.
205+
- Replace `<PR_NUMBER>` with the ID of the PR.
206+
195207
## Sync your Fork
196208

197209
Your fork `main` branch is now behind the source `main` branch. To fast-forward it to the latest changes, click the **Fetch upstream** button:

0 commit comments

Comments
 (0)
Please sign in to comment.