1

I can't understand what am I supposed to write/do after typing the comment for the git

As my terminal window is showing something like this

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
#
# Initial commit
#
# Changes to be committed:
#       new file:   MakeFile
#       new file:   find
#       new file:   find.c
#       new file:   generate
#       new file:   generate.c
#       new file:   helpers.c
#       new file:   helpers.h
#
# Changes not staged for commit:
#       deleted:    MakeFile
#
# Untracked files:
#       Makefile
#
0

If you don't specify a commit message using the -m switch on commit, git will open the configured editor. On my CS50.io appliance, that's pre-configured as nano, while on other systems a common option might be vim, as it's pre-installed on almost all Linux systems.

You'll have to add your commit message (if you're doing more than one line, leave the second line empty to separate a short "heading" from a longer description), save it to disk, and close the editor.

If you're doing nano, life is really comfortable, as you have some menu down there. ^O is a common way to refer to Ctrl+O. If asked for a file name, accept the one that's already there.

If you're doing vim, good luck (Disclaimer: I've been an Emacs user before). I think the way to save a file and close the editor is something like Esc : w q Return

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .