Import Github repository to PyCharm
Solution 1
You don't even need to move it. Simply select "Open directory" and point to the cloned repository.
You can perform a GitHub checkout directly from PyCharm (VCS | Checkout from Version Control | GitHub), but it will have the same effect: it will ask you where to clone the repository, clone it locally, and then open it as a project.
Solution 2
Use the menu, if you don't know how to get to the welcome screen:
VCS -> Get from Version Control...
Solution 3
I want to show 2-step solution for PyCharm 2020
1- From the welcome screen, select Get from version control
2- Type URL on the box
Thats it!
Solution 4
Another popular way on mac is to simply drag the cloned repository onto the PyCharm icon in the dock.
Solution 5
In PyCharm version 2021.2 the menu item "VCS" does not exist anymore. Instead go to Git > Clone ...
and then you'll reach the window, where you can enter the URL of your repository.
Johnny Metz
Updated on September 02, 2021Comments
-
Johnny Metz almost 3 years
I currently have a github repository cloned to my Desktop. I want to import it as a new Project in PyCharm.
Is this as simple as moving the repo under the "PyCharmProjects" folder or do I need to import it through some PyCharm feature?
Also is there a way to import a Github repository to PyCharm directly from Github (e.g. it isn't cloned to my local machine)?
I have the PyCharm Community Edition 2016.3
-
Johnny Metz over 7 yearsI've been opening the repo files from my Desktop but I've noticed some of the code isn't colored (e.g. 'type' and 'None' don't turn violet like they're supposed to). Any idea why this is happening and how I can fix it?
-
yole over 7 yearsYou need to open the entire repository using Open Directory. PyCharm won't provide its full feature set if you open files outside of the current project one by one.
-
Avinash about 6 yearsDoes this work even if the original repo was not a pyCharm project?
-
OmerB over 5 yearsNote that when doing a checkout - if you've defined your GitHub account in PyCharm, you can use auto-completion (ctrl + space) in the URL field to show your available GitHub repos for easy cloning.
-
pymen over 4 yearsNew action name from Pycharm 2019.?? - "Get from Version Control"
-
Younes El Ouarti over 3 yearsI absolutely hate that PyCharm and IntelliJ do this differently. It's so confusing!