我应该将go dep vendor /添加到.gitignore吗? [重复]

This question already has an answer here:

Should I add go dep vendor/ folder to .gitignore? Now I have vendor/ in .gitignore, so every deploy will call dep ensure

</div>

github/gitignore/Go.gitignore doesn't add vendor/ to its .gitignore file.

This causes its content should be versioned, recorded in the Git repository, instead of being potentially generated, and may respond to the following needs:

  • avoiding reference changes
  • dissapearing projects
  • vendoring tool may evolve (dep to vgo to modules), ...
  • if you made modifications to vendor dependencies in your Git repository, you should probably track those

On the other hand, gitignore.io/api/go does add vendor/ to its .gitignore.

So in conclusion, you might as well ignore it if you're not under any of the situations stated above.