Answer the question
In order to leave comments, you need to log in
How to do git pull from PHP or webhook for bitbucket?
I have the following code:
echo shell_exec('cd ' . $dir . ' && /usr/bin/git pull origin HEAD');
Answer the question
In order to leave comments, you need to log in
The webserver does not have permission to run/write files from the .git folder
To remove the notorious comment prompt, use the -m switch:
echo shell_exec('cd ' . $dir . ' && /usr/bin/git pull origin HEAD -m "Merge with origin"');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question