rlesias
rlesias

Reputation: 6277

Git for Windows opens a separate console every time I try to run git.exe?

I have added C:\Program Files (x86)\Git\cmd to my path environment variable.

All git commands run successfully but also open a new console which displays git's help.

Running git.exe directly also opens a separate console.

This is quite annoying as I see a popup every time I try to run a git command.

Upvotes: 1

Views: 409

Answers (1)

VonC
VonC

Reputation: 1324937

You should only add C:\Program Files (x86)\Git\bin to your PATH, not the cmd folder.

That should be enough to avoid the new console to popup every time.

Try the same (bin only to PATH) with a simple PortableGit-1.9.5-preview20150319.7z uncompressed anywhere you want.


Note: Git 2.42 (Q3 2023) offers a headless-git.exe, a non-console program that does not pop up any window.
That can be an alternative to test out here.

Upvotes: 1

Related Questions