I would like to version control my entire GOPATH to store all of my go code 
in a monolithic repository. (see http://danluu.com/monorepo/ or 
https://blog.gopheracademy.com/advent-2015/go-in-a-monorepo/)

The problem that I run into: how to manage dependencies with "go get" ?.. I 
would like to vendor these dependencies but git wants to treat them as 
nested repos and doesn't end up vendoring them on commit to the parent repo.

I have tried: moving nested ".git" directories to ".git-moved", etc. This 
works for vendoring go-gotten repos but is a hassle and also messes up 
future calls to go get:

$ mv   src/github.com/Sirupsen/logrus/.git   src/github.com/Sirupsen/logrus
/.git-moved
$ git add --all; git commit -m 'this commit vendors the logrus package'
$ go get -u github.com/Sirupsen/logrus
package github.com/Sirupsen/logrus: directory 
"/tmp/monorepo/src/github.com/Sirupsen/logrus" is not using a known version 
control system

I would have to mv those .git-moved directories back to .git before using 
go-get again and this would be a pain and not scalable to a team.

Has anyone come up with a solution for this?

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to