简体   繁体   English

MS Windows 上 Eclipse 中的 Git Bash 终端

[英]Git Bash terminal in Eclipse on MS Windows

I have two different laptops running MS Windows and noticed on one laptop there was a Git Bash option for a new terminal window in the Terminal view in Eclipse, while it was not available on the other laptop.我有两台不同的笔记本电脑运行 MS Windows,并注意到在一台笔记本电脑上,Eclipse 的终端视图中有一个用于新终端窗口的 Git Bash 选项,而在另一台笔记本电脑上不可用。

After a little trial and error, I was able to determine the Git Bash option is only available if the git cli client from https://git-scm.com is installed.经过一些试验和错误,我能够确定只有在安装了来自https://git-scm.com的 git cli 客户端时,Git Bash 选项才可用。

I like to be able to run git from the command line in Eclipse without having to switch windows.我喜欢能够在 Eclipse 中从命令行运行 git,而无需切换窗口。 Hope this helps someone trying to do the same thing.希望这有助于有人尝试做同样的事情。

You can use the Open A Terminal icon to open up Git Bash if Git Bash is already installed on your Windows machine.如果您的 Windows 机器上已经安装了 Git Bash,您可以使用 Open A Terminal 图标打开 Git Bash。

在此处输入图片说明

Update: Add Gitbash terminal to Eclipse:更新:将 Gitbash 终端添加到 Eclipse: 在此处输入图片说明

Install this plugin on Eclipse Marketplace:在 Eclipse Marketplace 上安装这个插件:

TM Terminal TM终端
https://marketplace.eclipse.org/content/tm-terminal https://marketplace.eclipse.org/content/tm-terminal

After that, go to Window -> Preferences -> Terminal -> Local Terminal and add a entry with full path where Git Bash executable (bash.exe) was installed.之后,转到 Window -> Preferences -> Terminal -> Local Terminal 并添加一个包含安装 Git Bash 可执行文件 (bash.exe) 的完整路径的条目。

Then you can open Git Bash pressing CTRL + ALT + SHIFT + T .然后你可以按CTRL + ALT + SHIFT + T打开 Git Bash。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM