presslabs / gitium

Keep all your WordPress code on git with a simple plugin and a repo
https://www.presslabs.com/code/gitium/
GNU General Public License v2.0
180 stars 31 forks source link

If using different branch than master git-webhook fails #169

Closed AMecea closed 6 years ago

AMecea commented 6 years ago

This is way: When doing git fetch it just fetch current branch, let's say prod branch, see code, and when does git push tries to push both branches: master and prod, code here but master branch is not updated and fails.

Error log:

PHP User Error:  Failed merge & push: s:581:"error: failed to push some refs to 'git@github.com:x/xx.git' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch and integrate the remote changes hint: (e.g. 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. To git@github.com:x/xx.git =  refs/heads/prod:refs/heads/prod [up to date] !  refs/heads/master:refs/heads/master [rejected] (non-fast-forward) Branch prod set up to track remote branch prod from origin. Done"; in /www/x/git-webhook.php on line 37 when calling trigger_error(), request: GET /git-webhook.php