Cyan's Blog

Search

Search IconIcon to open search

Difference_between_Git Bash_Git_CMD

Last updated Jul 27, 2021 Edit Source

# Git Bash or Git Cmd?

2021-07-27

Tags: #Git

# 它们是什么?

在为Windows Terminal设置Git界面的时候遇到了这个问题, Git提供了三种操控方式: Git GUI, Git Bash和Git Cmd, 第一个是图形界面, 那么后面两个命令行界面有什么区别呢?

Bash是Unix Shell的一种 Unix,一种操作系统,Linux是Unix的一种 Shell,“为用户提供用户界面”的软件,比如Windows里面的Cmd

CLI与GUI: 通常将shell分为两类:命令行与图形界面。命令行壳层提供一个 命令行界面(CLI);而图形壳层提供一个 图形用户界面(GUI)。1

# 如何选择?

Git CMD is just like regular Windows command prompt with the git command. It lets you use all of Git features through command line. Useful if you are already familiar with Windows cmd and you only work on Windows.

Git Bash emulates a bash environment on windows. It lets you use all git features in command line plus most of standard unix commands. Useful if you are used to Linux and want to keep the same habits.

Git GUI is a Graphical User Interface letting you use Git without touching command line. It is an alternative among other Git clients. Since Git GUI is very minimal, you could also look at other alternatives if GUIs interest you.

It is up to you to decide which you want to use. As many others, I recommend you to learn Git with command line before switching to a graphical interface. If you don’t know which to choose between Git Bash and Git CMD, I’d go for Git Bash since bash is a really useful tool to learn.2


  1. https://zh.wikipedia.org/wiki/%E6%AE%BC%E5%B1%A4 ↩︎

  2. https://stackoverflow.com/questions/45034549/difference-between-git-gui-git-bash-git-cmd ↩︎