Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Git Basics Getting Started With Git Commitment Therapy

git commit

Do I not use git commit when committing something?

1 Answer

geoffrey
geoffrey
28,736 Points

Firstly you need the file you are working on to be tracked, this way changements you do on your files are tracked.

As you've probably seen, you can achieve this by using the git add nameOfyourFile command. At this step, the file is in what we call the "staging area". Then only you can commit the file you want with the git commit -a -m "your message" command** (the a flag means all files between).