Git - Committing Changes
GitLab - Committing Changes
- Learn how to commit changes to the repository
- Commit the change
- Let’s commit what we have staged to the repository.
When you used git commit previously to commit the initial version of the hello.c file to the repository, you included the -m flag that gave a comment on the command line. The commit command will allow you to interactively edit a comment for the commit. Let’s try that now.
If you omit the -m flag from the command line, git will pop you into the editor of your choice. The editor is chosen from the following list (in priority order):
GIT_EDITOR environment variable
core.editor configuration setting
VISUAL environment variable
EDITOR environment variable
git config --global core.editor vim