Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clone Github repo to specific Windows folder?

How to change the cloning folder of a specific git? My default storage directory is here

C:\Users\myPC\Documents\GitHub

But for this one git

https://github.com/username/myproject

I want to put it in

C:\somefolder

(and not like C:\somefolder\myproject but all the files under C:\somefolder)

How to do that? I tried git clone command line but then the git doesn't show up in my Github for Windows client

Sorry for basic question but couldn't google or search here any answer!

like image 445
HP. Avatar asked Dec 20 '12 07:12

HP.


People also ask

Can you git pull a specific folder?

Current git versions support Sparse checkout which allows you to clone or fetch only a particular folder from a very big repository.

How do I change the directory of a clone?

The fastest way to change the folder name when cloning a GitHub repository is to simply specify the name you want at the end of the git clone command. Here's a short video showing the entire process: When you're done downloading the repo do cd your-app-name to enter your directory with all the Create React App files.


2 Answers

In "GitHub for Windows" first go to Tools-->Options Here select your folder in "default storage directory". Now in GitHub if you click on "Clone in Desktop" button then it will clone in selected folder

like image 68
Anuj Mehta Avatar answered Oct 16 '22 22:10

Anuj Mehta


The latest GitHub desktop client (3.3.4.0) prompts for a local directory to clone the repo to. This was when cloning my own repo from github.com to local.

like image 26
KalenGi Avatar answered Oct 16 '22 21:10

KalenGi