Quickly search for .git/HEAD and append refs/heads name.