Can I use gcloud in Git Bash on Windows?

You need to use the full file name i.e. gcloud.sh or gcloud.cmd. See the following question for more details:

Git Bash doesn't see my PATH


Create ~/.bashrc with one and only line:

alias gcloud="gcloud.cmd"

and restart you shell session. That's it.


Put the following in a .bashrc file which should be located in C:\Users\YourWindowsAccount:

gcloud() {
    "gcloud.cmd" "$@"
}
export -f gcloud

Adapted from: https://askubuntu.com/a/98791

Restart Git Bash thereafter.

This solution is better than using aliases because it allows you to call gcloud from a shell script also.