I am not able to pull a file remotely from git server through php. I wrote the following BAT code and am trying to execute it via php. the batch file git1.bat is a follows:
cd C:\repos\rep2 && git pull origin master 2>&1
the php code:
<?php
echo shell_exec("C:\\xampp\htdocs\AS-otg\\git1.bat");
?>
the output I get:
However, I get the required result when I do the same directly from cmd.

I tried some other git commands like log etc. which work just fine. I need to do this via php only... please help.
