How do I get branch created timestamp with PHP?

84 views Asked by At

I want to get created Git branch (hotfix / feature) timestamp with shell_exec.

I tried below,

shell_exec("git show --summary `git merge-base your_branch master`");

But it showing null.

Does anyone know how to get it with php ?

1

There are 1 answers

0
Lazy Badger On

You used correct command for getting commit-hash (git merge-base), but git show --summaryfor branchpoint is damned delirium!!!

git show -s --format=%ci <...>

or another formats for another timestamp's representation