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 trialSusan Rusie
10,671 PointsHow do you delete a repository if you misspelled it?
I just realized I misspelled my repository name on the nano command line? I couldn't find any documentation to figure this out. Any help on this would be greatly appreciated.
2 Answers
Torben Korb
Front End Web Development Techdegree Graduate 91,433 PointsJust the remove the hidden .git folder from the directory. After this you can init a new repository. Hope this helps!
Michael Hulet
47,913 PointsIf you want to remove a git
repository from a folder, you just need to delete the hidden .git
folder, as Torben Korb said. If you're doing this from the command line, you just need these commands:
# Make sure you're in the directory of the repository you want to delete
cd path/to/project
# Delete the repository folder and everything in it
rm -r .git
Susan Rusie
10,671 PointsWhy is this not working? This is what I am seeing in the console:
treehouse~/my_first_repsository $ ls -a
. .. file1 file2 file3
treehouse~/my_first_repsository $ rm -r .git
rm: cannot remove 'git': No such file or directory
I've already had my console reset before and I would like to avoid having to do that again if at all possible.
Michael Hulet
47,913 PointsAccording to ls -a
, there is no .git
folder, which means that you've already deleted it