In case the Jenkins is triggering a build by restricting it to run on a slave or any other server (you may find it in the below setting under 'configure')
then the Path to Git executable should be set as per the 'slave_server_hostname' or any other server where the git commands are executed.