Add head detach test.
Add isHeadOrphan and update todo.
Add isEmpty check.
Add more tests.
Simplify checking return type of git functions by introducing requireBool.
Add tests for isBare.