def current_branch
      repo.current_branch.tap {|b| raise Thor::Error.new("No explicit branch passed and current head looks detached: #{b}") if b[0] == '(' }
    end
def current_branch
      repo.current_branch.tap {|b| raise Thor::Error.new("No explicit branch passed and current head looks detached: #{b}") if b[0] == '(' }
    end
Get the current branch but raise an error if it looks like we're on a detched head.

 @api private
 @return [String]