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 trialMark Chesney
11,747 Pointsbest 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
Front End Web Development Techdegree Graduate 84,738 PointsYou 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.
Mark Chesney
11,747 PointsMark Chesney
11,747 Pointsmmm okay... just wanted to ask before doing it... in case someone with experience knew it could be this straightforward. thanks Brendan!
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsBrendan Whiting
Front End Web Development Techdegree Graduate 84,738 Pointstry it with a test repo
Mark Chesney
11,747 PointsMark Chesney
11,747 Pointsoh yeah... test repo is a good idea! :)