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 Committing Changes

Sean Flanagan
Sean Flanagan
33,235 Points

How to exit the README file

Hi.

I've saved the README file but I'm still stuck in it. Tommy didn't say how to quit it. How do I get out of it please?

Mikhail Boldyrev
Mikhail Boldyrev
1,152 Points

Have you tried Ctrl + Z or CMD + Z? Gets me out of the console when I'm stuck, typically.

6 Answers

Sean Flanagan
Sean Flanagan
33,235 Points

Hi guys. I've checked. The console was playing up so I had to shut it down and start it up again, but when I listed the contents of my_really_cool_project, README.save was there.

Thanks.

Sean

Joel Bardsley
Joel Bardsley
31,249 Points

If you're using Nano like in the video, it's ctrl + X. If you have unsaved progress it'll give you a 'Save modified buffer?' Yes/No prompt, enter Y or N to make your selection and press Enter to confirm and exit. This is covered in the video at around 0:35.

Sean Flanagan
Sean Flanagan
33,235 Points

Hi Mikhail. Thanks for the very quick reply. No I didn't use Ctrl + Z as it wasn't listed. I've tried it since and it doesn't work. The only way I could exit README was by using Ctrl + C to cancel and when I typed ls, README wasn't listed.

For windows, Please try below options: press Escape key and then :wq and then Enter key to Save or press Escape key and then :qa! and then Enter Key to Quit.

I can't exit the file either. Control - x doesn't let me leave.

Ben S
Ben S
5,638 Points

If you opened vim by accident and get stuck, hit the escape key a few times just to make sure you are in the right mode then :q will get you out. If you get an error "no write since last change" then type :q! and that should force quit.