1

I am using Windows 10. I have Git Bash (from Git 2.20.1) installed with configuration of using MinTTY as terminal emulator. I can see that following entry in Git-2.20.1/etc/install-options.txt Bash Terminal Option: MinTT This means when I start git-bash it uses MinTTY as terminal - one can see this by right clicking on the title bar of git-bash window.

Now I have to switch to windows default console. When I say "switch" I mean when I start git-bash I expect it to use windows console - I should be able to confirm this by right clicking on the title bar of git-bash window.

Below link explains the difference between MinTTY and Windows console - https://willi.am/blog/2016/08/08/docker-for-windows-interactive-sessions-in-mintty-git-bash/

However I cant find any config or mechanism to change this. (Changing install-options.txt with Bash Terminal Option: ConHost does not have any effect) And I cant reinstall it as it has came via my organizations packaging system.

Is there any config anyone knows which I am missing?

Appreciate help - Many Thanks !

Preetam Palwe
  • 43
  • 1
  • 7
  • Can't say for sure but I think instead you need to do this: https://stackoverflow.com/a/34555806/791430 – Omer Tuchfeld Jul 27 '20 at 08:01
  • @PreetamPalwe : What do you mean by _switching_ here? Mintty is a terminal program, which you start explicitly. The windows console (I guess you mean by this what you get on windows when you do a Windows+R key and then start the command `cmd`) is also explicitly started by you. What kind of switching do you need, if you can decide which one you want to run? – user1934428 Jul 27 '20 at 09:56
  • @user1934428 - I have improved my question to answer your queries - thanks ! – Preetam Palwe Jul 27 '20 at 12:11
  • Do you mean when you double click `git-bash.exe`, you get mintty terminal, but you want a Windows 10 default console ? – Philippe Jul 27 '20 at 12:26
  • @PreetamPalwe : Why don't you do it the other way round: Start any terminal you like, and from within run your bash shell manually? BTW, your question is not really about programming and hence off-topic here. You better ask this at, say, [Superuser](https://superuser.com/help/on-topic). – user1934428 Jul 27 '20 at 12:51
  • @Philippe - yes - exactly (Not necessarily double click - you can start git-bash via command line as well. run cmd -> goto git installation folder -> run git-bash – Preetam Palwe Jul 27 '20 at 13:04
  • @user1934428 - yes - I am already running my shell script via bash. I started bash by directly running it from windows cmd.exe. (E.g. run cmd -> goto git installation folder \bin -> run bash) – Preetam Palwe Jul 27 '20 at 13:09
  • So you can run bash from the Windows console. Where is the problem then? – user1934428 Jul 27 '20 at 14:29
  • The problem is - if I run git-bash then I get mintty and I wanted windows console :) – Preetam Palwe Jul 27 '20 at 15:52

2 Answers2

0

This switch is a part of git-bash.exe binary. It's only being edited by Git Windows installer hook named edit-git-bash.

You could compile and run edit-git-bash.

Or reinstall Git entirely (simpler)

0

Try to install the same Git for Windows version on another windows machine, choose "Use Windows default console window" during installation.

Copy C:\Program Files\Git\git-bash.exe from another machine to your organization's computer (if movement of binary files is restricted, try to encode it with base64, copy and decode).

At your organization's computer copy C:\Program Files\Git to Desktop folder and replace Desktop\Git\git-bash.exe with git-bash.exe from another machine.

Now you can use git bash with MinTTY(MSYS2) from C:\Program Files\Git and git bash with Windows default console from Desktop\Git at the same time.

tigl
  • 556
  • 5
  • 5