Windows – How to stop git-bash shell from waiting for process to finish

bashgit-bashterminalwindows

Based on a solution to How do I open a new git bash terminal window at my current location in windows? I can use

$ git-bash

to launch a new terminal from inside a git-bash console window.

However, this will block the original terminal which will be waiting for the result of the new git-bash.

Can I start a new terminal window without having it wait for the result?

Best Answer

In Bash, you can append & to run a command in the background.

In order to suppress its shell output (if any), you can also redirect its STDERR and STDOUT to /dev/null.

So, use this:

git-bash & > /dev/null 2>&1

When you close the window, the command should also exit in the background.