cd $GOPATH/src/; git pull --ff-only origin 

Add `origin master` suffix to the command suggested by the error. (master 
or otherwise)

The error occurs because the repo got a new branch since your last go get.

On Saturday, May 28, 2016 at 11:12:27 PM UTC+5:30, Tong Sun wrote:
> How to fix the "You are not currently on a branch" error for `go get`?
> $ go get -u
> # cd .../src/; git pull --ff-only
> From
>  * [new branch]      gh-pages   -> origin/gh-pages
>    bbd33c0..38ee283  master     -> origin/master
>  * [new branch]      systemlib  -> origin/systemlib
>  * [new tag]         v1.0.0     -> v1.0.0
>  * [new tag]         v1.1.0     -> v1.1.0
> You are not currently on a branch.
> Please specify which branch you want to merge with.
> See git-pull(1) for details.
>     git pull <remote> <branch>
> package exit status 1

You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to