Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make bash as default shell in git alias?

Is there a way to specify the default shell used by git alias (which is currently /bin/sh for linux systems and /bin/zsh for macOS)? I know that we can wrap the command with bash -c '<command script>' but I was looking for a way to change the default.

like image 242
Hardik Aggarwal Avatar asked Oct 25 '25 14:10

Hardik Aggarwal


1 Answers

It is hardwired into the binary.

You can recompile with a different value:

./configure --with-shell=PATH

but see this answer: https://stackoverflow.com/a/46698535

like image 156
jhnc Avatar answered Oct 27 '25 03:10

jhnc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!