How to Change Folder Name When Cloning a GitHub Repo

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.

Follow this structure:

git clone repo-name folder-name

Real-life example cloning the popular create-react-app repository and renaming it to your-app-name:

git clone your-app-name

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. You can do npm install or yarn to install it just as you normally would.

Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊


Share & Discuss on