问题
I am just learning Ruby and Rails, and am using RubyMine on Windows as my IDE. GitHub has just released GitHub for Windows. I installed it, and it seems like a nice interface. However, it does not seem to have installed anything like a git.exe for RubyMine to pick up and work with. So RubyMine whines that it can't find git, and git (in the form of GitHub for Windows) sits there blithely ignoring RubyMine.
Naturally, I've looked for information on the GitHub site - nothing. Am I going to have to install the "old" git client for RubyMine to use?
回答1:
GitHub distribution is bundled with PortableGit which is unpacked into AppData\Local\GitHub
and you can use this git client in RubyMine.
Full path to the git executable provided by GitHub installation that can be used in RubyMine on my system is:
c:\Users\<user>\AppData\Local\GitHub\PortableGit_0812189c12ccff4584523d6efce294a33dd2332a\bin\git.exe
Note that it's probably some random hash in the path so it may be different on your system.
If you don't want to dig for this executable, just install and use msysgit, there should be no difference, in fact the version currently reported by GitHub PortableGit is:
git version 1.7.10.msysgit.1
vs git version 1.7.11.msysgit.1
of the latest msysgit available at the moment of writing this answer. So the "old" command line client is newer than the "new" GitHub provided client, at least now.
来源:https://stackoverflow.com/questions/11497506/integrating-rubymine-with-github-for-windows