You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useCzProject\GitPhp\Git;
$git = newGit;
$repo = $git->open(base_path()); // base path of local files$repo->checkout('main');
$repo->pull('origin');
// make some changes to the local files.// check for changes madeif ($repo->hasChanges()) {
$repo->addAllChanges();
$repo->commit('My Commit Message');
$repo->push(NULL, array('--repo' => 'https://'.env('GITHUB_USER').':'.env('GITHUB_PASS').'@github.com/MyUser/MyRepo.git'));
}
I am able to read the repo, make changes, detect those changes all with success. However when I try to do a commit, I get an error. Command 'git commit -m 'My Commit Message'' failed (exit-code 1).
I've tried setting up the repo to use https and SSH, both fail at the same step. All commands continue to work in the Terminal as expected. Any thoughts on why I would get a failure on the commit command?
Activity
janpecha commentedon Sep 15, 2021
Hello, I don't know where can be problem but try to dump error output:
Maybe it helps to find solution.
dmerfeld commentedon Sep 15, 2021
I'm not sure if this might be helpful but here's the output:
janpecha commentedon Sep 21, 2021
It's look like problem with pre-commit hook. Unfortunately I don't know how to solve it, I don't use
huskytool :(