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 trialSeth Warner
5,348 PointsOn video "Committing Changes" I noticed that Tommy did not include a hash tag in front of his comment and..
and I could not tell which keys he was pressing when it came to exiting the commit file, giving him the success message. Did he hit cmd + o then cmd + x or something?
Seth
2 Answers
Christopher Misa
6,467 PointsThe message is the main content of this file. If it is preceded by hash tags, git will ignore it and think you left an empty message. . .
He probably pressed [control + o] to write out the file, [return] to accept the file name, and [control + x] to exit the program.
Jane Eyer
2,586 PointsIf ctrl + x does not work for you then your git is using vim. In that case, Press esc and type ":wq" (w- means for write, q - means for quit) and press enter.
In the future if you want to use nano as a default text editor. then go to the main screen on terminal. type: nano ~/.gitconfig
The above command line will open an empty file and in the empty file type: git config core.editor "nano"
then press ctrl + x and enter to save and get out.
Happy gitting :D