apenwarr/git-subtree — pull request #6 by mhart (2011-10-15 13:24:35+00:00)
Title: Added check to ensure that split succeeds before trying to push

Currently, if the `git subtree split` portion of the `git subtree push` command fails for any reason (in my case it was a `fatal: bad object` error), then the push command will actually delete the remote branch because the ref now just starts with a colon! Unfortunately I lost one of my remote branches due to this.

This commit fixes that by only pushing if the split command returns a non-empty ref.