How can git commands like git add . and git commit -m be executed using php?
It is for a project that creates a centralized repository faci
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 www-data user.
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