Get stuck at the last part!


<Below this line, add a link to the EXACT exercise that you are asking about.>

<Below this line, describe in what way does your code behave incorrectly? Include ALL error messages.>
I’m stuck at this “From the terminal, make a commit to save the Larry/Laertes name swap in hamlet.”

<Below this line, add a screenshot of your whole web browser so that we can see what you see.>

The program that you need to run is git, you would tell git to commit by giving it certain arguments

Hmm… Now I tried this
$ git commit scene-2.txt
then I typed the combination
ctrl + o

And I can’t pass it!

You seem to be saying that git opened your default editor to edit a file with a commit message, but that you saved the result in a different name instead. If so, git would have told you that you entered no commit message and that it therefore aborted. (You have to watch what feedback you get)

I’m having this same problem. It’s driving me out of my mind!!!

Then the same answer applies

hmm… Now I did the following

git commit scene-2.txt |_enter
Larry/Laertes name swap in hamlet |typed
ctrl + o |

Exit the editor so that git can continue

I quit the editor the same trouble
error “Did you commit your changes to the Git repository”

Not the same trouble, you fixed the other one by finishing the commit, now you have a second problem.

In the previous exercise you added scene-3 and scene-7, in this one you were supposed to add, and then un-add, scene-2, with the end result that only scene-3 and scene-7 should still be staged when committing.

If you look at your screenshot, you’ll see you did it the other way around.

Go back to the previous commit with git reset HEAD^ and then add scene-7 and scene-3 and commit

Thx it worked but I didn’t understand anything in this tutorial

Took me a while to understand too but the deal is that you are removing scene-2.txt from the staging area because it was messed it up by our “accidental” deletion. Then you commit the the part of the project that remains in the staging area (scene-3.txt and scene-7.txt): $ git commit -m “LARRY/LEARTES”.
If you try and commit scene-2.txt it will error as it no longer exists in the staging area.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.