FAQ: Basic Git Workflow - git commit

This community-built FAQ covers the “git commit” exercise from the lesson “Basic Git Workflow”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development
Computer Science

Learn Git

FAQs on the exercise git commit

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

I honestly still don’t really understand what git commit is used for. Can I have another example?

3 Likes

To describe the changes you made and reference them later either in the title or in the code itself. Imagine submitting a report to your boss. Then if your boss likes it, he will “push” the report. Push comes after commit.

Hi, the exercise worked fine but can someone please explain the meaning of the text in bold:
[master (root commit) ba9349c]
1 file changed, 3 insertions (+)
create mode 100644 scene-1.txt

2 Likes

What does -m do and mean?

1 Like

For what is Git projects used for?

1 Like

The ‘m’ is an option which stands for message. It enables us to provide a description for the commit that helps our teammates understand what happened.

1 Like

When committing a change in git, why isn’t the filename mentioned? How does it know what we are “committing”?

I don’t understand why commit message is prefered to be written in the present tense instead of past tense??

1 Like

Same here! Why use the present tense?