Reece Dunn, 05.04.2009:
Hi,
Here is something I have just recently tripped up on.
$ git pull
[..]
$ git branch
* (no branch)
master
Running `git checkout master && git pull` fixed the above issue. The
patch below improves the error message for users that are in this
state.
Also, is "branch..remote" valid? Should this be "branch.remote"?
The current branch has no name, so there is nothing between the two
dots. For clarification: branch.(no branch).remote
+ echo "You may not be on a branch. In this case, you need to move"
+ echo "onto the branch you want to pull to (usually master):"
+ echo " git checkout <branch>"
+ echo
Not being on a branch is not the general case when you receive this
message. Maybe determining if you are not on a branch and adjusting the
message acordingly is an option.
Markus