Import Github repository to PyCharm

40,116

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...

enter image description here

Solution 3

I want to show 2-step solution for PyCharm 2020

1- From the welcome screen, select Get from version control

enter image description here

2- Type URL on the box

enter image description here

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.

enter image description here

Share:
40,116
Johnny Metz
Author by

Johnny Metz

Updated on September 02, 2021

Comments

  • Johnny Metz
    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
    Johnny Metz over 7 years
    I'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
    yole over 7 years
    You 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
    Avinash about 6 years
    Does this work even if the original repo was not a pyCharm project?
  • OmerB
    OmerB over 5 years
    Note 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
    pymen over 4 years
    New action name from Pycharm 2019.?? - "Get from Version Control"
  • Younes El Ouarti
    Younes El Ouarti over 3 years
    I absolutely hate that PyCharm and IntelliJ do this differently. It's so confusing!