How can git commands like
git add .
git commit -m
$path = "/var/www/repos/$_POST[project]";
exec("git add .");
exec("git commit -m'message'");
echo "<h3 align = center> Succesfully commited all the files.</h3>";
It is definetly possible. I implemented it in one of my projects. However you should be careful about permissions.
On linux, usually, the
exec command will execute using the
So you should allow
www-data to write and read on your work directory.
One quick and dirty way to do it is :
chmod o+rw -R git_directory