Allow deploying from a detached head #12
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm having an issue deploying to brand new heroku servers.
The first push to a new server is failing with:
This is important to me as I'm having travis-ci create a new heroku server against each pull request.
Seems to be the same issue discussed here: http://git.661346.n2.nabble.com/error-with-git-push-origin-HEAD-newbranch-td6333596.html
As far as I can tell, the "master" branch is not yet a known branch on the new heroku server, and the local HEAD is detached so git doesn't know whether the "master" it's pushing is a branch or tag. This is resolved by specifying that it is, indeed, a branch: refs/heads/master.
This may be git-version dependent, as mentioned in the mailing list. I experience the error through travis-ci but have been unable to reproduce the error locally locally (git version 1.7.5.4).
Thanks!