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?
The text was updated successfully, but these errors were encountered:
My code structure looks something like this:
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?
The text was updated successfully, but these errors were encountered: