Ran into the same problem and used `git branch -u origin <branch-name>` 
before `go get -u` to fix this problem. But of course you need to set up 
the remote branch first.

On Thursday, March 3, 2016 at 11:47:55 AM UTC-8, Garrett Heel wrote:
>
> I've noticed that doing a "go get -u" on go1.6 fails when you import a 
> package from the *same* repo *and* you're on a branch.
>
> For example..
>
> github.com/example/example/
>   package1/
>     main.go
>   package2/
>     main.go
>   common
>     common.go
>
> If package1/main.go imports github.com/example/example/common, "go get" 
> does the following..
>
> cd /Users/me/go/src/github.com/example/example
> git pull --ff-only
>
> There is no tracking information for the current branch.
> Please specify which branch you want to merge with.
> See git-pull(1) for details
>
>
>     git pull <remote> <branch>
>
>
> If you wish to set tracking information for this branch you can do so with
> :
>
>
>     git branch --set-upstream-to=origin/<branch> testing-go-get
>
>
>
> That is, the "git pull --ff-only" fails due to the fact that we're on a 
> branch.
>
> Is there some alternative way of doing this which supports fetching 
> dependencies from a branch?
>

-- 
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 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to