@@ -179,16 +179,35 @@ the following line in the terminal:
179179
180180 $ git config --global core.editor "nano -w"
181181
182+ If you have Visual Studio Code set up to run from the terminal, then this is
183+ another good choice of Git editor. Run the following to check that you can run
184+ Visual Studio Code from the terminal:
185+
186+ .. code-block :: console
187+
188+ $ code -v
189+ 1.62.0
190+ b3318bc0524af3d74034b8bb8a64df0ccf35549a
191+ x64
192+
193+ You will almost certainly see different version information, and this is fine.
194+ Assuming that worked, run the following to set Visual Studio Code as your Git
195+ editor:
196+
197+ .. code-block :: console
198+
199+ git config --global core.editor "code --wait"
200+
182201 .. only :: not book
183202
184- If you have a favourite text editor, you can set it using the ` Software
185- Carpentry instructions
203+ If you have a different favourite text editor, you can set it using the
204+ ` Software Carpentry instructions
186205 <https://swcarpentry.github.io/git-novice/02-setup/index.html> `_.
187206
188207.. only :: book
189208
190- If you have a favourite text editor, you can set it using the Software
191- Carpentry instructions. [#swcarpentry_editor ]_
209+ If you have a different favourite text editor, you can set it using the
210+ Software Carpentry instructions. [#swcarpentry_editor ]_
192211
193212Default pull behaviour
194213~~~~~~~~~~~~~~~~~~~~~~
@@ -425,6 +444,12 @@ folder (`/Users/dham`), which is what I expect.
425444 will download all the files and folders, but none of the data Git needs for
426445 revision control.
427446
447+ The instructions here focus on command line interfaces because it's a lot
448+ easier to ask for help if you get stuck with a command line interface. "I
449+ typed the following and this was the resulting output" is a much easier and
450+ more precise way of describing a problem than attempting to explain what
451+ you did in a graphical interface.
452+
428453Editing `exercise.txt `
429454~~~~~~~~~~~~~~~~~~~~~~
430455
@@ -516,7 +541,7 @@ second of those presently, but first let's learn about `git add`.
516541.. note ::
517542
518543 The default branch may be called something other than `main `. In
519- particular, older repositories often have a default branch called `master `.
544+ particular, older repositories often have a default branch called `main `.
520545 It doesn't matter what the default branch is called.
521546
522547Staging files for commit
@@ -548,11 +573,11 @@ didn't mean to do that then we should use the command `git restore --staged` to
548573unstage the file. However, we did mean to stage `exercise.txt ` so now we can go
549574on to make the actual commit.
550575
551- .. only :: book
576+ .. .. only:: book
552577
553- .. raw :: latex
578+ .. .. raw:: latex
554579
555- \clearpage
580+ .. \clearpage
556581
557582 .. warning ::
558583
@@ -603,7 +628,7 @@ Let's use our go to command, `git status` to see what we've done:
603628 nothing to commit, working tree clean
604629
605630 This is now quite different from what we've seen before. We're still on branch
606- master , but now we're informed that we're ahead of `origin/main ` by one
631+ main , but now we're informed that we're ahead of `origin/main ` by one
607632commit. This is because we've made a commit locally on our machine, but we
608633haven't yet pushed that change up to GitHub. Git helpfully informs us that we
609634could remedy this situation using `git push `. Because we've committed all the
@@ -661,7 +686,7 @@ GitHub:
661686 Depending on your configuration, you might have to enter your GitHub username
662687and password. The output includes quite a lot of detail that we currently don't
663688care about, but the last two lines tell us which GitHub repository we were
664- pushing to, and that we pushed the local master branch to the GitHub master
689+ pushing to, and that we pushed the local main branch to the GitHub main
665690branch.
666691
667692If we now type `git status `, we find that we are no longer ahead of
@@ -713,20 +738,20 @@ better idea to grab the commit hash for the commit you want directly from the
713738GitHub web interface. The most reliable way to find the commit hash is to follow
714739the steps above to navigate to the commit in which you are interested. The
715740commit has his the 40 character hexadecimal number on the right: in this case
716- `5a4a79c81244ed278a14e239eb59c29b218d85ce `.
741+ `316a22cedb8627940aee7f1744297708324102f1 `.
717742
718743
719- Autograding
720- ~~~~~~~~~~~
744+ Autograding with GitHub Actions
745+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
721746
722747Notice in the commit list above that the final (top) commit has a green tick
723748mark next to it, while the previous commit has a red cross. These marks appear
724- because this exercise has autograding set up in GitHub classroom. Autograding is
725- a mechanism for automatically running tests on each commit to provide immediate
726- feedback as to the correctness of the work. Autograding is the generic term for
727- this sort of automated testing when applied to coursework. It doesn't
728- necessarily imply that you will receive marks for passing the tests. If we click
729- on the green tick and then on ` details `, we can see a little more information:
749+ because GitHub has been configured to automatically run tests on each commit to
750+ provide immediate feedback as to the correctness of the work. Autograding is
751+ the generic term for this sort of automated testing when applied to coursework.
752+ It doesn't necessarily imply that you will receive marks for passing the tests.
753+ If we click on the green tick and then on ` details `, we can see a little more
754+ information:
730755
731756.. image :: images/github_autograding_pass.png
732757
@@ -743,9 +768,9 @@ as to what we have done wrong:
743768
744769This is indeed very useful as the error tells us that the test was expecting
745770"Hello Mars!" but instead found "Hello World". This is clearly a trivial
746- example. The precise form of the tests and the feedback they will provide will
747- vary from module to module, and will depend in particular on which programming
748- language is being used .
771+ example, however the tests provided with the exercises in this book also
772+ attempt to provide useful feedback on what has gone wrong when a test is
773+ failed .
749774
750775.. rubric :: Footnotes
751776
0 commit comments