You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
branch '1_add-favourite-cloud' set up to track 'origin/1_add-favourite-cloud'.
191
187
```
192
188
193
189
## Open a Pull Request
@@ -203,9 +199,9 @@ Just like this repository used Issue templates it
203
199
also uses a [PR template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository).
204
200
205
201
Check the Issue you opened earlier for the Issue number.
206
-
`mo-fitzroy` checks theirs and it was Issue `#7`.
207
-
So he changes the line `Fixes <#ISSUE_NUMBER>` to `Fixes #7`.
208
-
This will automatically close Issue 7 when the PR is merged.
202
+
`mo-fitzroy` checks theirs and it was Issue `#1`.
203
+
So he changes the line `Fixes <#ISSUE_NUMBER>` to `Fixes #1`.
204
+
This will automatically close Issue 1 when the PR is merged.
209
205
We use the keyword `Fixes` here instead of the `Closes`
210
206
keyword we used before because this PR comes from a fork[^link-issue-pr].
211
207
@@ -219,6 +215,9 @@ which look like this:
219
215
- [ ] I have read `CONTRIBUTING.md` and added my name as a Code Contributor.
220
216
```
221
217
218
+
Some open source projects require you to add your name
219
+
to a list of contributors.
220
+
We will do this later so for now mark the task as complete.
222
221
Replace the space in the square checkbox brackets with an `x`
223
222
to mark the task as complete:
224
223
@@ -230,57 +229,125 @@ Now when you open the PR it should look something like this:
230
229
231
230
{alt='A screenshot of a users pull request from their fork back to the upstream git-training-demo repository.'}
232
231
233
-
This PR number `#8` will close/fix Issue number `#7` (the top left arrow).
232
+
This image shows PR number `#8`.
233
+
This PR will close/fix Issue number `#7` (the top left arrow).
234
234
You can request a review on the top right.
235
235
Some repositories will be set up to automatically assign
236
236
a reviewer based on how many reviews each team member
237
237
currently has open[^auto-assign-pr-review].
238
-
The middle arrow shows the checklist items we marked as complete.
238
+
The bottom arrow shows the checklist items we marked as complete.
239
239
240
240
At the bottom of your PR you can see that a review is required
241
241
before merging.
242
242
All checks have passed, this repository has automatic checks
243
243
for trailing whitespace, accidentally adding large files etc.
244
244
More information can be found in the optional episode on
245
-
pre-commit hooks.
246
-
It also tells us **This branch has conflicts that must be resolved** and the conflicting file is `CITATION.cff`.
245
+
[pre-commit hooks](./09-pre-commit.md).
246
+
247
+
The PR will now need to be approved and merged by your instructors.
248
+
249
+
::::::::::::::::::::::::::::::::::::: instructor
250
+
251
+
Take a break here!
252
+
This will give you and your co-instructor time
253
+
to approve, and squash and merge the PRs.
254
+
255
+
::::::::::::::::::::::::::::::::::::::::::::::::
256
+
257
+
## Updating a Fork
258
+
259
+
Our fork is now behind the main upstream repository
260
+
by one commit.
261
+
We are going to update our fork.
262
+
First we need to set the correct upstream remote in git.
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
328
+
To github.com:mo-fitzroy/git-training-demo.git
329
+
f87bb5c..90808ab main -> main
330
+
```
331
+
332
+
Your forks `main` branch is now up to date with the
333
+
main `git-training-demo` repositories `main` branch.
334
+
335
+
::: callout
336
+
337
+
## Sync via GitHub
338
+
339
+
This is equivalent of syncing your fork via the GitHub banner
340
+
shown earlier:
341
+
342
+
{alt='A screenshot of a users repository showing just the banner announcing the repository is a fork and that is up to date with the upstream repository.'}
343
+
344
+
If your fork is **behind** the upstream repository
345
+
GitHub will alert you on the banner.
346
+
You can use the **Sync fork** button to update your fork like we did above.
347
+
After syncing your fork this way you only need to run `git pull`
0 commit comments