Skip to content
Advertisement

PHP: Get all Commit Messages of Remote Repository

I’m trying to parse all the Git Commit Messages of a Remote Repository. So far I have:

JavaScript

When I use the same commands in console it works just fine, showing me all the Commit Messages.

However once I try it in PHP, it only shows me “Initial Commit” and nothing else.

Advertisement

Answer

The output you need to dump is not returned by the exec() function, it’s in $output.

Instead of your last line, try

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement