Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (19.4k points)

when I clone something from Github, it creates a folder with the same name as the app on my computer. Is there a way to change the name.

For example, doing this clone creates a long "sign-in-with-twitter" folder

git clone

I know I can rename the folder after, but I'm wondering if there's a way to rename it as it comes in by adding an option on the end of the statement. For example

git clone  as 'signin'

the problem is that I'm cloning some apps multiple times in order to tweak some of the settings to get it to work, and if there's a problem, I delete the folder but I'm worried that some of the gems remain installed even though I've deleted the folder

1 Answer

0 votes
by (119k points)

If you want to clone a particular branch only, then,

git clone -b <branch-name> <repo-url> <destination-folder-name>

for example,

git clone -b dev signin

Also, check out this Git Tutorial to know more.

Browse Categories