Although this is not apart of a specific lesson, I thought it would be useful to have a question to check about the run through you do in the terminal for submitting your second blog post.
MCQ 1.
You’ve successfully cloned the training course repository and added your first GitHub blog post. What is the correct workflow in the terminal when adding your second ever GitHub Blog post?
A)
- git pull upstream gh-pages
- git add 2015-02-26-for-loops-R.md
- git commit 2015-02-26-for-loops-R.md
- git push origin gh-pages.
B)
- git clone https://github.com/your-repo/training-course.git
- git remote add upstream https://github.com/swcarpentry/training-course.git
- git add 2015-02-26-for-loops-R.md
- git commit 2015-02-26-for-loops-R.md
- git push origin gh-pages.
C)
- git clone https://github.com/your-repo/training-course.git
- git pull upstream gh-pages
- git add 2015-02-26-for-loops-R.md
- git commit 2015-02-26-for-loops-R.md
- git push origin gh-pages.
D)
- git remote add upstream https://github.com/swcarpentry/training-course.git
- git pull upstream gh-pages
- git add 2015-02-26-for-loops-R.md
- git commit 2015-02-26-for-loops-R.md
- git push origin gh-pages.
MCQ 2 The possible answers with explanations for the distractors
A)
- git pull upstream gh-pages
- git add 2015-02-26-for-loops-R.md
- git commit 2015-02-26-for-loops-R.md
- git push origin gh-pages.
In this question the learner has gotten the correct work flow apart from the fact that they need to add the upstream once for this second blog post.
B)
- git clone https://github.com/your-repo/training-course.git
- git remote add upstream https://github.com/swcarpentry/training-course.git
- git add 2015-02-26-for-loops-R.md
- git commit 2015-02-26-for-loops-R.md
- git push origin gh-pages.
In the question the learner will have confused that you only need to clone the training course repository on git once and that you only need to pull what is upstream to update your copy of the training course.
C)
- git clone https://github.com/your-repo/training-course.git
- git pull upstream gh-pages
- git add 2015-02-26-for-loops-R.md
- git commit 2015-02-26-for-loops-R.md
- git push origin gh-pages.
In the question the learner will have confused that you only need to clone the training course repository on git once. They have also forgotten that as this is their second blog post, they will also need to add the upstream once per repository.
D)
- git remote add upstream https://github.com/swcarpentry/training-course.git
- git pull upstream gh-pages
- git add 2015-02-26-for-loops-R.md
- git commit 2015-02-26-for-loops-R.md
- git push origin gh-pages.
This is the correct work flow.