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

General Discussion

Jenna Malone
Jenna Malone
7,173 Points

My git log is not showing the commit message or the commit

So Im sure Im on the branch foo_feature because I will do a "git status" and it tells me I'm there. But when I opened the file in nano, saved it, then closed it, and committed it when I then typed in git log it doesn't show the commit that took place. Sorry its kinda difficult to post my code here but did this happen to anybody else or does anyone have an idea as to why this would happen?

Seth Kroger
Seth Kroger
56,413 Points

Did you add it before (or during) committing?

2 Answers

Jenna Malone
Jenna Malone
7,173 Points

Seth Kroger I added it while committing. I honestly don't know what happened but I started the video over again and went over everything step by step again and this time it worked. Thank you for your input!

Seth Kroger
Seth Kroger
56,413 Points

The only thing I can think of is if the file was new. git commit -a works it the file was previously committed before but new files always have to be added with git add first.

Jenna Malone
Jenna Malone
7,173 Points

Seth Kroger Oh okay now that makes sense. Maybe that is what was wrong because when I started the lesson I opened the console instead of continuing off from the previous lesson. Thank you for your help and input Seth!