-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path05-making-pull-request.qmd
51 lines (48 loc) · 2.03 KB
/
05-making-pull-request.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Making a pull request
## Making a pull request
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, fig.align = "center")
```
- Let's start by creating a new branch
```{r}
knitr::include_graphics("img/pr-new-branch.png")
```
- We do some work (in VSCode/text editor/RStudio) which creates a markdown file with a title and some text. We then make a new commit which adds this new file to the repo
```{r}
knitr::include_graphics("img/pr-commit-new-file.png")
```
- Next publish the new branch to GitHub
```{r}
knitr::include_graphics("img/pr-publish-branch.png")
```
- Now initiate the creation of the PR by either clicking in GitHub Desktop "Create Pull Request"
```{r}
knitr::include_graphics("img/pr-create-pr-01.png")
```
- or clicking on the button on the repo webpage "Compare & pull request"
```{r}
knitr::include_graphics("img/pr-create-pr-02.png")
```
- Edit the title box, add some extra text in the comment box, select a reviewer, and then click "Create pull request"
```{r}
knitr::include_graphics("img/pr-create-pr-and-reviewers.png")
```
- You can amend/edit pull requests by modifying/adding commits to the branch from which you sent the PR
- See more about pull request reviews [here](https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews)
- (The reviewer) will then merge your PR
```{r}
knitr::include_graphics("img/pr-merge-pr.png")
```
- (The reviewer) will then confirm the merge
```{r}
knitr::include_graphics("img/pr-confirm-merge.png")
```
- (Optional) Delete the branch the PR came from
```{r}
knitr::include_graphics("img/pr-delete-branch.png")
```
- The PR is now finished and we can see the merge commit in the default (`main`/`master`) branch
```{r}
knitr::include_graphics("img/pr-finished.png")
```
- In GitHub Desktop click "Fetch origin"/"Pull origin" to pull the updated `main`/`master` branch down to your local machine ... and the process begins again ...