Topic: Git and vendor directory current best practice

I've been trying to find out what people are putting under version control with git.  Obviously things like log files, search indexes, and sqlite databases should be left out. 

My biggest question is regarding the vendor directory.  Put it under normal git version control? use git submodules? maybe symboic links?  Just ignoring them?  Just wondering what people are doing with this directory.

Re: Git and vendor directory current best practice

bump! I clone alot of git repos into vendor/plugins, and obviously I'd like to continue to pull from those repos, so I don't want to delete their respective .git directories. However, I have the whole project under git control itself, so I'm worried it's tracking unnecessary files in the vendor/plugins/*/.git directories.

What are the best practices when it comes to this?

Re: Git and vendor directory current best practice

I found git submodules to work very well. What convinced me to try them out were these blog posts: … submodules … les-part-2

In short, git submodules are simple to use, transparently tracks the checked out submodule tag (eg. maybe I want to lock the project on Rails v2.0.2 instead of edge), and only updates the files it needs to.

The only possible downside I see is that it doesn't store submodule files in your git repository. Everytime you checkout a project from scratch, you'll have to download the submodule files from their original sources again. I haven't found that to be a problem since I rarely do that and Capistrano can be configured to cache remotely.

Vincent Woo Ruby on Rails Blog