Clone repository
IntelliJ IDEA allows you to clone (or check out, depending on version control system you use) an existing repository and create a new project based on the data you have downloaded.
You can clone a remote Git, Mercurial, or Subversion repository from the Welcome screen that opens right after launching IntelliJ IDEA or from the main menu.
note
If you want to work with Perforce projects, refer to the Perforce guide.
You can clone a remote Git, Mercurial, or Subversion repository from the Welcome screen that opens right after launching IntelliJ IDEA.

Clone a remote repository:
Click Get from VCS in the upper right corner.
In the Get from Version Control dialog that opens, select Git from the list.
Specify the URL of the remote repository that you want to clone.
In the Directory field, enter the path to the folder where your local repository will be created.
Click Clone.
Click Get from VCS in the upper right corner.
In the Get from Version Control dialog that opens, select Mercurial from the list.
Specify the URL of the remote repository that you want to clone.
In the Directory field, enter the path to the folder where your local repository will be created.
Click Clone.
Click Get from VCS in the upper right corner.
In the Get from Version Control dialog, click Add Repository Location and specify the repository URL.
Click Check Out.
In the dialog that opens, specify the destination directory where the local copy of the repository files will be created, and click OK.
If you are checking out sources for an existing project, the destination folder should be below the project content root.
In the SVN Checkout Options dialog, specify the following settings:
Revision to be checked out (HEAD or a selected revision).
Whether you need to check out the nested directories.
Whether you need to include the external locations.
Click OK.
The cloning process starts. In the list of projects, you can see the repository that you are currently cloning with the progress bar of the cloning process. Note that you can clone several repositories at the same time.

When the cloning process finishes, IntelliJ IDEA opens the project.
Click
on the right side of the cloning progress bar.
In the Stop Cloning dialog that opens, choose Stop to stop the cloning process. If you changed you mind, choose Cancel to continue the cloning process.
If there is an error during the cloning process, a notification in the bottom-right corner will warn you about it.

From the main menu, choose Git | Clone.
In the Get from Version Control dialog that opens, select Git from the list.
Specify the URL of the remote repository that you want to clone.
In the Directory field, enter the path to the folder where your local repository will be created.
Click Clone.
From the main menu, choose VCS | Get from Version Control.
In the Get from Version Control dialog that opens, select Mercurial from the list.
Specify the URL of the remote repository that you want to clone.
In the Directory field, enter the path to the folder where your local repository will be created.
Click Clone.
From the main menu, choose VCS | Get from Version Control.
In the Get from Version Control dialog, click Add Repository Location and specify the repository URL.
Click Check Out.
In the dialog that opens, specify the destination directory where the local copy of the repository files will be created, and click OK.
If you are checking out sources for an existing project, the destination folder should be below the project content root.
In the SVN Checkout Options dialog, specify the following settings:
Revision to be checked out (HEAD or a selected revision).
Whether you need to check out the nested directories.
Whether you need to include the external locations.
Click OK.
More details about setting up local repositories:
Thanks for your feedback!