I have 2 repositories. Let say them repo_a and repo_b. I imported repo_a in repo_b
When I ran go get, it will get repo_a master branch. Is there any way to get develop branch using go get or another command from repo_b?
I do not want to git pull on each specific package (in this case repo_a)
Under your project repo, select Branches. On the Branches page, select More options next to the new default branch you want, and choose Set as default branch. After you set the new default branch, you can delete the previous default if you want.
just need to run git fetch , which will retrieve all branches and updates, and after that, run git checkout <branch> which will create a local copy of the branch because all branches are already loaded in your system.
Starting with Go 1.11, this is possible when using Go modules. When installing a dependency for a Go module, you can specify a module query which may contain a branch or tag name:
$ go get <path-to-repo>@<branch>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With