Be aware that the shell could be fish, not bash or zsh.
Use fish-compatible syntax when running terminal commands,
or run them in bash explicitly by wrapping them in bash -c '...'.
When running git commands, add the --no-pager flag to make sure the entire output is printed.