Push where upstream branch does not exist
Opened this issue · 0 comments
We are using this library to do auto-code commits from a Drupal implementation. When we build a site we pass a non-existent branch to the site which checks out the repositories locally to a branch which potentially does not exist on the remote.
When I get the error below, and try and manually do a git push
git tells me I need to git push --set-upstream origin branchname
, but looking at line 568 of Git.php I see there is no way to set-upstream in the library, and there is no way to create the branch on the remote.
WD php: Exception: in GitRepo->run_command() (line 280 of /var/.../libraries/git/Git.php). Cannot modify header information - headers already sent by (output started at /usr/share/php/drush/includes/output.inc:38) bootstrap.inc:1232 Exception: in GitRepo->run_command() (line 280 of /var/aegir/platforms/.../libraries/git/Git.php).