Unable to learn when the work is irretractably done for me


#1

Attempting to do the "Backtracking" part of the Git tutorial.
In exercise 1 I'm asked to add certain text to the file.
I have no idea how to do this.
I try a few lines in the terminal, like "git add ..." and "git change ..." and "git update ..." but nothing works. I'm totally stumped. I keep clicking "Run" in order to try to get some help. Eventually I'm presented with either "Keep Working" or "Get Code". I'm trying to get help, or a hint, or find a pointer to another section of Codecademy that will refresh my knowledge / inform me. When I click on "Get Code" I see an indication "Fetching Code" and suddenly the lesson is completed for me. I haven't learned the new information, and no matter what I do I apparently can't "undo" this "Get Code" effect. I've tried logging out and logging back in to Codecademy, but the lesson stays irretractably completed, and I have no idea what I was supposed to learn from it.
There are two hints now available in the left pane:

From the terminal, add scene-5.txt to the staging area.
Here's a hint on how to do it.
-and-
Commit the changes to the repository with a good commit message.
Here's a hint on how to do it.

The "hint" for the first option links to exercise 5 of the "Basic Git Workflow" lesson, but attempting to do that lesson, or indeed attempting to use the information provided there back in the previous exercise, fails. In the current exercise I type "git add scene-5.txt" and apparently it's alright, as no error message is produced. But then typing "git commit -m "added ghost text to the file"" produces

On branch master
nothing to commit, working directory clean

I've proceeded to exercise 3 ("git checkout") this way, and the same thing happened. I was unclear on how to achieve what was expected, namely "Change the ghost's words in some way." I tried "git alter ..." and "git change ..." and "git update ..." and knew I was getting nowhere. I kept trying the guessing game until finally the options popped up again "Keep Trying" or "Get Code". Clicking the "Get Code" option, once again, apparently finished the exercise for me, and I have no idea what I'm supposed to know or have learned at this stage.

Also, not only is the lesson apparently completed (all checkboxes on the left pane are now filled in), and not only can I not "undo" this effect in order to try to actually learn the lesson, but any of the further instructions produce no results. I.e. following the instruction "From the terminal, use git diff to see the difference between scene-5.txt as it appears in the working directory vs. how it appears in your last commit." -- typing into the terminal "git diff" produces zero results, just returns to a blank prompt. Equally, typing "git checkout HEAD scene-5.txt" also produces zero results.

It would be great if there were some kind of hint(s) for how to proceed, rather than just secretly finishing a given exercise for the student without any further information provided.


#2

Let's see if we can get you back on track!

If you want to reset the course:

  • go to the earliest exercise that you want to reset to -- EVERYTHING after that will be reset if you follow this next step
  • under the "Get Help" button, there is a "I want to restart this exercise" option

The right hand pane is the terminal. We are using that to issue git commands. git can add a file to the snapshot of your project but git can not edit your file.

Your text editor is the middle pane.

Let's get back to the earliest exercise where you are having a problem and go from there.


#3

Many thanks for the prompt reply.

I've since "dialed in" and realised that references to the "Code Editor" refer to the pane in the middle of the screen, and clicking "Run" is the equivalent of "saving" the text that is written into that file, though it not be a code.

Thank you for the tip on how to restart the exercise.

I did return to other Git lessons to get a better handle on what I was missing.
I still don't understand why the "git status" commands were producing the wrong results, but for now this does get me back on track.