git 将 Github 存储库导入 PyCharm
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41023928/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Import Github repository to PyCharm
提问by Johnny Metz
I currently have a github repository cloned to my Desktop. I want to import it as a new Project in PyCharm.
我目前有一个 github 存储库克隆到我的桌面。我想将其作为 PyCharm 中的新项目导入。
Is this as simple as moving the repo under the "PyCharmProjects" folder or do I need to import it through some PyCharm feature?
这是否像将 repo 移动到“PyCharmProjects”文件夹下一样简单,还是我需要通过某些 PyCharm 功能导入它?
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)?
还有一种方法可以直接从 Github 将 Github 存储库导入 PyCharm(例如,它没有克隆到我的本地机器)?
I have the PyCharm Community Edition 2016.3
我有 PyCharm 社区版 2016.3
回答by yole
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.
您可以直接从 PyCharm (VCS | Checkout from Version Control | GitHub) 执行 GitHub 签出,但它会产生相同的效果:它会询问您在哪里克隆存储库,将其克隆到本地,然后将其作为项目打开。
回答by Johnny Metz
Another popular way on mac is to simply drag the cloned repository onto the PyCharm icon in the dock.
mac 上另一种流行的方法是简单地将克隆的存储库拖到 Dock 中的 PyCharm 图标上。