Have you failed a job interview?
Send us your job interview questions and get correct answers.

What is a git commit command?

Experience Level: Junior
Tags: GitSource control

Answer

When you execute the git commit command from the command line, the staged changes from your Staging Area (Index) will be sent to your local repository.

In any version control system it has always been a good practice to append a message with description of changes that are included in the commit. In Git it can be done using the following command:

git commit -m "Something has changed"

If you omit the -m parameter with description of changes, the Git will automatically display the default editor and will let you enter the commit message using the editor. The command looks like this:

git commit

Comments

No Comments Yet.
Be the first to tell us what you think.
Git for beginners
Git for beginners

Are you learning Git ? Try our test we designed to help you progress faster.

Test yourself
25 Git questions that will help you to nail your job interview
25 Git questions that will help you to nail your job interview

Are you learning Git ? Try our test we designed to help you progress faster.

Test yourself