git-remote(1) - The Linux Kernel Archives
With -a or --auto, the remote is queried to determine its HEAD, then the symbolic-ref refs/remotes//HEAD is set to the same branch. e.g., if the remote HEAD is pointed at next, "git remote set-head origin -a" will set the symbolic-ref refs/remotes/origin/...