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 The Staging Area

removing directories in git

hey folks, having trouble removing directories that have files in them. in the command line i'll do: rm -r tested_repo then i'll get a message like this: override r--r--r-- Username/staff for tested_repo/.git/objects/66/2d0e94c13a4fb635dffbc09dc9238f7f1d2bd7? not sure how to override that message to rm the directory i want.

also when trying to commit: git init "directory" nano "add a file" inside nano- 'made changes etc.' saved git add 'file' git commit 'file' when i try to make changes it seems as though i'm unable to save these changes- anyone know why that is? seems i can't hit control+x to save the changes and push....

thoughts?

1 Answer

Dave McFarland
Dave McFarland
Treehouse Teacher

You can override the message when deleting the directory like Jeremy suggested:

sudo rm -r tested_repo

But the message you're getting indicates you're deleting the actual git repo (the .git directory) -- is that what you want to do?