I have the complete src-tree of a go / golang project in a git repository. This so I can easily clone a complete project and its dependencies to a different computer.
When using go get from e.g., github.com, go clones the github project inside my src-tree.
Is there an easy / standard approach for converting this inner git repo into a submodule? Something similar to git submodule add <path>
?
Or do I have to, manually or automatically, find the url to the inner repository and use git submodule add <url> <path>
Any arguments for NOT using this approach? As far as I can see, the advantages are that I have complete control of versioning of the sources, easy cloning of the complete project including dependencies, easy way to update third-part code I depend on / retrieved using go get.
Conclusion Thank you Will C and VonC. I ended up using the vendor system with the tool govendor. I like the tool because of its transparancy and simplicity - it is never a required tool. Also, the Go vendoring system satisifies my main objective - to make it easy to clone my complete project and its dependencies to a different computer.