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!

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 Working With Remote Repositories Cloning

best way to move a local git repo that's also in synch with GitHub?

Hi, just wondering: I have a local git repo that's also in synch with GitHub. If I want to move it, would I clone it to the new directory, then delete the old one (and do so within Git?), and then push to GitHub? Or shall I simply drag and drop in the folder navigator, then push to GitHub? Thanks all

1 Answer

Brendan Whiting
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,734 Points

You should be able to drag and drop the folder I think. Inside the folder is a little .git file that is managing the repo, keeping track of your remote and all that. (You won't see files that start with a dot in the finder, but you can see them in the terminal if you run ls -a or ls -la) If you move the folder, that file should travel with it, and everything should be working fine.

mmm okay... just wanted to ask before doing it... in case someone with experience knew it could be this straightforward. thanks Brendan!

oh yeah... test repo is a good idea! :)