你如何让Git与IntelliJ一起工作? [英] How do you make Git work with IntelliJ?

查看:133
本文介绍了你如何让Git与IntelliJ一起工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将使用IntelliJ Community Edition的Git版本控制功能来制作我打算开发的程序的分支。我努力使自己适应其功能,并且我遇到了障碍。

我按照网页 http:// wiki的说明操作。 jetbrains.net/intellij/Using_Git_Locally ,虽然我按照它的顺序执行,但当我到达Image5时,我在Default下找到一个空列表。

这可能与我的想法没有关系,所以我继续这个程序。

但是当我提到Committing Changes到Master(修订版本1),这个列表也是空的,commit改变没有检测到我的项目有任何改变(见Image13和Image 14)。

除此之外,我再次打开项目时收到一条消息,指出Git执行路径不正确。但是我怎样才能知道什么样的执行路径应该是合适的,以便插入它?

有没有人知道一个体面的指令顺序(在网站上或者他的经验),这可以指导我如何利用Git功能来整合它到我的工作?对我来说,完成我的工作至关重要。

解决方案

您需要在 Git Settings ,在每个请求中提到:


Git集成插件已启用,并且在设置对话框中的> Git页面。

只要您看到一条指示Git执行路径不正确的消息,其余指令将不会工作。


路径Git可执行文件



在此文本框中,指定Git可执行文件的路径。

手动输入路径或单击浏览按钮打开 Select Path - Git Configuration 对话框,然后在目录树中选择Git可执行文件的位置。

请参阅 git.exe的位置位于?用于Windows上Git的路径。


  • with Git for Windows

      C:\ Program Files \Git\mingw64\bin 

    OR p>

      c:\path\to\PortableGit-2.6.2-64-bit\usr\bin 

    OR

      c:\path\to\PortableGit-2.x.\wmw64\bin 


  • 使用 GitHub桌面

     %USERPROFILE%\AppData\Local\GitHub\PORTAB〜1\bin\git.exe 



I am going to use Git version control by IntelliJ Community Edition in order to make branches of the programs I intend to develop. I am striving to accustom myself to its functionality and I come accross obstacles.

I follow the instructions of the web-page http://wiki.jetbrains.net/intellij/Using_Git_Locally and although I do what it orders, when I reach Image5 I find an empty list under Default.

It is possible that it does not matter I thought, so I continued the procedure.
However when I come to most important section of Committing Changes to Master (Revision 1) the list is also empty and the commit changes does not detect any changes to my project (see Image13 and Image 14).

Apart from that, I receive a message when I open the project once more indicating that the Git execution path is not correct. But how can I get knowledge of what execution path should be appropriate so as to insert it?

Does anybody know a decent order of instructions (on a web site or by his won experience) which can guide me to how I can take advantage of Git functionality to incorporate it to my work? It is crucial for me to put my work through.

解决方案

You need to specify the executable path of Git in the Git Settings, as mentionned in the per-requesites:

The Git integration plugin is enabled and the location of the Git executable file is correctly specified on the Git page of the Settings dialog box.

As long as you see "a message indicating that the Git execution path is not correct", the rest of the instructions won't work.

Path to Git executable

In this text box, specify the path to the Git executable file.
Type the path manually or click the Browse button to open the Select Path - Git Configuration dialog box and select the location of the Git executable file in the directories tree.

See "Where is git.exe located?" for the path of Git on Windows.

  • with Git for Windows:

    C:\Program Files\Git\mingw64\bin
    

    OR

    c:\path\to\PortableGit-2.6.2-64-bit\usr\bin
    

    OR

    c:\path\to\PortableGit-2.x.\mingw64\bin
    

  • With GitHub Desktop:

    %USERPROFILE%\AppData\Local\GitHub\PORTAB~1\bin\git.exe
    

这篇关于你如何让Git与IntelliJ一起工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆