rowoot/gulp-gh-pages — pull request #16 by chadrien (2014-05-28 12:35:16+00:00)
Title: Do not hardcode current branch

Current branch is hardcoded (https://github.com/rowoot/gulp-gh-pages/blob/master/lib/git.js#L110) and can lead to errors when the default remote branch is not master.

![screen shot 2014-05-27 at 14 15 47](https://cloud.githubusercontent.com/assets/1788218/3091172/dad258fa-e598-11e3-9b77-b78f2950a081.png)

With this setting, `getCommits(this._repo, this._currentBranch)` (https://github.com/rowoot/gulp-gh-pages/blob/master/lib/git.js#L129) result to the following error

```
Error: Error: Command failed: fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
```

A solution could be to call `gift.branch()` after the clone with no first parameter so it would return the current branch and assign it to `__currentBranch`