Change name of folder when cloning from GitHub?

Solution 1:

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

refer the manual here

Solution 2:

git clone <Repo> <DestinationDirectory>

Clone the repository located at Repo into the folder called DestinationDirectory on the local machine.

Solution 3:

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

Solution 4:

Here is one more answer from @Marged in comments

  1. Create a folder with the name you want
  2. Run the command below from the folder you created

    git clone <path to your online repo> .