From 1e94b6bfbb0a7949bcf5d997d8348b5719857434 Mon Sep 17 00:00:00 2001 From: Dimitrios Theodorakis Date: Tue, 17 Dec 2024 13:34:58 +0000 Subject: [PATCH] Adds a short paragraph explaining git pull and PRs are not the same and fixes a small error in a callout related to pushing --- episodes/07-github.md | 2 +- episodes/10-pull-requests.md | 8 +++++++- episodes/fig/github-repo-after-first-push.svg | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/episodes/07-github.md b/episodes/07-github.md index 08810a5d2f..0b89e67237 100644 --- a/episodes/07-github.md +++ b/episodes/07-github.md @@ -438,7 +438,7 @@ Our local and remote repositories are now in this state: You may see a `-u` option used with `git push` in some documentation. This option is synonymous with the `--set-upstream-to` option for the `git branch` command, and is used to associate the current branch with a remote branch so -that the `git pull` command can be used without any arguments. To do this, +that the `git push` command can be used without any arguments. To do this, simply use `git push -u origin main` once the remote has been set up. Here, we are telling Git to push the branch diff --git a/episodes/10-pull-requests.md b/episodes/10-pull-requests.md index 3a3c96e1ed..8f990d3b44 100644 --- a/episodes/10-pull-requests.md +++ b/episodes/10-pull-requests.md @@ -162,7 +162,7 @@ The PR is now successfully merged into the `main` branch. We can safely delete the `forecast` branch from the GitHub repo. Click on the **Delete branch button**. -### Updating your Local Repo +## Updating your Local Repo The new `forecast.md` file is currently only on the `main` branch in GitHub. We should pull the changes down to our local copy. @@ -195,6 +195,12 @@ Fast-forward create mode 100644 forecast.md ``` +`git pull` and GitHub's Pull Requests are not the same. +GitHub Pull Requests are where we performed code and science review, +then merged our feature branch changes into the `main` branch. +`git pull` is fetching changes to the remote branch on GitHub +and merging them into your local copy. + ::: callout ### How do I know there are Changes to Pull? diff --git a/episodes/fig/github-repo-after-first-push.svg b/episodes/fig/github-repo-after-first-push.svg index 73acb2143e..bec4abed8e 100644 --- a/episodes/fig/github-repo-after-first-push.svg +++ b/episodes/fig/github-repo-after-first-push.svg @@ -479,5 +479,5 @@ id="text5128" font-size="12" x="-33.987309" - y="386.71658">git push origin + y="386.71658">git push \ No newline at end of file