我是否需要 Git 才能在 JetBrains IntelliJ IDEA 中使用 Github?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4581832/
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
Do I need Git to use Github in JetBrains IntelliJ IDEA?
提问by Sahat Yalkabov
JetBrains IntelliJ IDEA has 2 plugins: Gitand Github. Do I need to install Git from http://git-scm.comon my local windows machine in order to upload my files to GitHub through IntelliJ IDEA?
JetBrains IntelliJ IDEA 有 2 个插件:Git和Github。我是否需要从http://git-scm.com在我的本地 Windows 机器上安装 Git才能通过 IntelliJ IDEA 将我的文件上传到 GitHub?
回答by Darren Bishop
I just came up against the same problem.
我刚刚遇到了同样的问题。
If you choose not to do the full PATH (environment variable) integration when install git (on Windows) you'll need to tell IntelliJ where to find git.cmd
; you can do this in
如果您在安装 git(在 Windows 上)时选择不进行完整的 PATH(环境变量)集成,则需要告诉 IntelliJ 在哪里找到git.cmd
;你可以这样做
Settings > Project Settings > Version Control > VCSs > Git
Examplein my case it was portable git looks like this on windows
例如在我的情况下,它是便携式的git看起来像这样在Windows
C:\Users\user\AppData\Local\GitHub\PortableGit_d7effa1a4a322478cd29c826b52a0c118ad3db11\cmd\git.exe
C:\Users\user\AppData\Local\GitHub\PortableGit_d7effa1a4a322478cd29c826b52a0c118ad3db11\cmd\git.exe
回答by pony
Settings > Project Settings > Version Control > git
设置 > 项目设置 > 版本控制 > git
Path to Git executeable : D:\Program Files (x86)\Git\cmd\git.cmd
Git 可执行文件的路径:D:\Program Files (x86)\Git\cmd\git.cmd
回答by Steve K
Yes, it looks like you need to have git installed on your machine. I just tried to clone a project on github, and I got:
是的,您的机器上似乎需要安装 git。我只是试图在 github 上克隆一个项目,我得到了:
Cannot run program "git.exe" (in directory "C:\Users\Steve\Code"): CreateProcess error=2, The system cannot find the file specified
回答by marioskamperis
You can tell IntelliJ where to find git.exe
. This can be done by going into:
您可以告诉 IntelliJ 在哪里可以找到git.exe
. 这可以通过进入:
Configure->Settings->Version Control->Git->Path to Git Excetuable
Changing the path to something like this:
将路径更改为如下所示:
C:\Users\***YOUR_USER_NAME***\AppData\Local\GitHub\PortableGit_c7e0cbde92ba565cb218a521411d0e854079a28c\cmd\git.exe`
回答by xenteros
On Windows, you have to install Git first. git-for-windows.github.iois OK. Then
在 Windows 上,您必须先安装 Git。git-for-windows.github.io 没问题。然后
Configure->Settings->Version Control->Git-><browse for git.exe>