简体   繁体   English

Windows的git bash的功能是什么?

[英]What is the function of git bash for windows?

Is git bash something that can be used as a windows alternative to terminal on ubuntu? git bash是否可以用作ubuntu上终端的Windows替代品? Can we use cmd.exe for the same purpose? 我们可以将cmd.exe用于相同的目的吗?

Git BASH provides a BASH emulation used to run Git from the command line. Git BASH提供了一个BASH仿真,用于从命令行运行Git。 Unix users should feel right at home, as the BASH emulation behaves just like the "git" command in LINUX and UNIX environments. Unix用户应该有宾至如归的感觉,因为BASH仿真的行为就像在LINUX和UNIX环境中的“ git”命令一样。

Also it is used to run commands of Linux such as ls,cd etc. If you want to use commands in Windows go install GIT BASH. 它还用于运行Linux的命令,例如ls,cd等。如果要在Windows中使用命令,请安装GIT BASH。

You cannot use command prompt for same purpose. 您不能出于相同目的使用命令提示符。

Git bash exists as a minimal environment for running git on Windows. Git bash作为在Windows上运行git的最小环境而存在。 Git itself consists of a number of shell and Perl scripts as well as binaries. Git本身由许多Shell和Perl脚本以及二进制文件组成。 In order to run them you need an environment that can interpret shell scripts. 为了运行它们,您需要一个可以解释shell脚本的环境。 A Windows command prompt can only interpret Batch files. Windows命令提示符只能解释批处理文件。

Note that git bash doesn't have much more than the shell, git, ls, and a few other utilities. 请注意,git bash的功能并不比shell,git,ls和其他一些实用程序多。 If you need a more complete shell and tool suite then look at https://www.cygwin.com/ instead. 如果您需要更完整的外壳和工具套件, 查看https://www.cygwin.com/

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

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