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 trialPatrick O'Dacre
15,471 PointsCloning on my machine using a relative file path?
In the video the clone is completed by using the ~/my... pathing.
I would like to clone using relative pathing when the path is long.
I tried this when I was in the main repo I wanted to clone:
git clone ../current_folder ../new_folder
both folders are in the same parent folder.
Just want to make sure this is correct. I don't think it is since I get different results when trying to push.
Thanks
2 Answers
Sara Chicazul
7,475 PointsYour syntax should work as stated to clone current_folder into new_folder. You could also use a single period to refer to the current directory, for example:
git clone . ../new_folder
What result were you expecting when you tried to push, and what happened instead?
Patrick O'Dacre
15,471 PointsHi Sara and thanks.
I got it to work last night.
I went ahead of the video and tried following a git instruction to set the upstream pathing... and that messed things up. I don't have the exact details.
The lesson is don't work ahead of the video unless you're really sure of what you're doing.
Sara Chicazul
7,475 PointsHa! Glad you got it figured out. (: