Reputation: 41929
When I clone something, it creates a folder with the same name as the app on my computer.
For example, doing this clone creates a long "sign-in-with-twitter" folder:
git clone https://github.com/sferik/sign-in-with-twitter.git
Is there a way to specify a custom name?
Upvotes: 790
Views: 444983
Reputation: 15158
You can do this:
git clone https://github.com/sferik/sign-in-with-twitter.git signin
# or
git clone [email protected]:sferik/sign-in-with-twitter.git signin
Upvotes: 1449
Reputation: 759
Here is one more answer from @Marged in comments
Run the command below from the folder you created
git clone <path to your online repo> .
Upvotes: 17
Reputation: 15333
In case you want to clone a specific branch only, then,
git clone -b <branch-name> <repo-url> <destination-folder-name>
for example,
git clone -b dev https://github.com/sferik/sign-in-with-twitter.git signin
Upvotes: 23
Reputation: 4438
Arrived here because my source repo had %20
in it which was creating local folders with %20
in them when using simplistic git clone <url>
.
Easy solution:
git clone https://teamname.visualstudio.com/Project%20Name/_git/Repo%20Name "Repo Name"
Upvotes: 9
Reputation: 5670
git clone <Repo> <DestinationDirectory>
Clone the repository located at Repo into the folder called DestinationDirectory on the local machine.
Upvotes: 87