Avoid detached head warnings when checking out config from git

Pull request for debian bug #727687