gh-stack icon indicating copy to clipboard operation
gh-stack copied to clipboard

Error given when a push fails due to hook failure is not useful

Open matthewhively opened this issue 2 months ago • 0 comments

I have a pre-push hook setup on my local repos.

When I try gh stack sync it results in this: Pushing 3 branches to origin... ⚠ Push failed — branches may need force push after rebase

When I try gh stack push it results in this: Pushing 3 branches to origin... ✗ failed to push: failed to run git: error: failed to push some refs to 'github.com:<my_repo>'

When I try gh stack submit it results in this: Pushing to origin... ✗ failed to push <my_branch>: failed to run git: error: failed to push some refs to 'github.com:<my_repo>'

Eventually I was able to guess it was my pre-push hook and tried a regular push and it told me what the error was immediately.

matthewhively avatar Sep 21 '26 18:09 matthewhively