Not in case of bundles. 

Examples:
https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/.gitignore
https://github.com/sonata-project/SonataAdminBundle/blob/master/.gitignore
https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/.gitignore