Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools Introduction to Git First Commits Initializing a Repository

Sarah Breidenbach
Sarah Breidenbach
4,490 Points

Can I create a repository on a USB drive?

Can I create a repository on a USB drive in case my computer dies? And also, would that be useless if I lost the working directory?

2 Answers

Steven Parker
Steven Parker
218,830 Points

It would be handy if you lost the working directory, because you could re-create the project from the repository.

Only if you want to... ..in the event that your computer dies, you need not worry about your work as it will remain safe online. Simply clone your repo of choice to your new computer~

Steven Parker
Steven Parker
218,830 Points

That would only apply if there is an online repo. From the question, it wasn't clear if the USB repo might be the only one.