Exercise 5/8 - Learn Git

Hi Guys,

I have been trying to complete exercise 5 of 8 (the last question). I have been trying numerous times to complete this but I am unable to do so. Can anyone help me with this one please and explain the answer.

If you do not supply a commit message when commiting, git opens your text editor (nano) so that you can write a commit message, save, and exit the text editor, and then git reads that file to obtain the commit message.

You still have that text editor running in your right panel, note the banner in the top stating that it’s GNU nano, and the shortcuts listed at the bottom. That isn’t bash.

So what you would do from where you are in your screenshot, is remove those 8-10 lines you wrote because those don’t belong in a commit message, and write a commit message and save and exit. Or, exit without saving and supply a commit message as an argument instead.


Thank you for your reply. I have tried the same commands in bash but it still does not appear to work

That doesn’t tell me anything. I suggest reading any error messages git is responding with and comparing to what you want to do and from there decide what needs to be different.

type git commit -m " change larry to laertes"

which is exactly what you did

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