From: Markus Heidelberg Date: Sun, 05 Apr 2009 21:42:44 GMT Subject: Re: Running 'git pull' from an unnamed branch Message-ID: <200904052342.44856.markus.heidelberg@web.de> In-Reply-To: <3f4fd2640904051433u199587c3wc9bf080d138944e7@mail.gmail.com> 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 " > + 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