How can I use a development copy/clone of a package while using dep and a vendor directory? The vendor directory is included in the main repository.
For example, I have forked package and replaced it with my own on github. I want to be able to edit the code and not have to git push + dep ensure for each change of the package.
If I clone the package in the vendor directory, it I won't be able to commit that directory into the main repo because it's treated as a separate repository.
I tried a trick to .gitignore the .git directory from outside the package. This works well until dep ensure is run, where the .git directory is nuked.
An alternative to "ignoring
.git" is to keep the.gitfolder elsewhere! (well outside of your Go project)Any time you need to execute a git command in the vendored sub-project, you would need to use an alias to the git command, which would be:
That way, you can still benefit from version-controled operations within your vendored subproject.