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 trialJason Choi
Front End Web Development Techdegree Graduate 21,159 PointsCommit doesn't work on Mac Terminal
I'm using the Terminal on my Mac. Everything works well but when I type "git commit", nano text editor doesn't open and some different software opens. I can type the descriptions but there is no command to quit or save (ctrl q or ctrl x doesn't work either).
2 Answers
Ari Misha
19,323 PointsHiya there! Commit is the step for committing all your changes. Its kinda like a final step. To commit changes , type
git commit -m "Initial Commit"
in the terminal. The -m flag means with message. Now this flag really important Since you'll be makin multiple commits in the future. And when you'll do git log
you'll see the commit with the message. I hope it helped! (:
~ Ari
Warren Reader
5,930 PointsWhat's likely happening is when you're submitting the commit, instead of nano opening, another text editor called vim opens. To permanently fix this so nano is your default editor when using git, run the command git config --global core.editor "nano"
You could also use the flag -m
to add your commit message without having to open a text editor.
Jason Choi
Front End Web Development Techdegree Graduate 21,159 PointsJason Choi
Front End Web Development Techdegree Graduate 21,159 PointsThank you!