git pull提示当前不在某个分支上

$ git pull
You are not currently on a branch, so I cannot use any
'branch.<branchname>.merge' in your configuration file.
Please specify which remote branch you want to use on the command
line and try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.

The solution (in this case, per the above directory) is to run:

$ cd /path/to/git/repository/from/above
$ git checkout master 
原文地址:https://www.cnblogs.com/coolid/p/6084976.html