Question

I have the next question: My colleague cloned the symfony sonata git repository. He did the install which pulls alot of different vendor repo's.

Then he removed all the .git files, initiated a git repository and pushed everything to our remote git repository.

I cloned our repo, but nothing works. So I had to remove the .git, initiate a new repo and then do the install myself.

What we have now is each a git repository locally that is not linked to the remote repository, and the vendor bundles are not anymore tracking their repo.

Does anyone have a good workflow for setting up a sonata install on your own git repository while your vendor bundles are still tracking their repo's and symfony does as well ?

Was it helpful?

Solution

You should:

  • create a new Symfony project (using this)
  • tweak your .gitignore file
  • then follow installation instructions for each bundle (here's an example for the Sonata PageBundle)

Unless special circumstances, you should ignore the vendors directory in your repo and manage dependencies using deps or composer. If you really have to somewhat "commit" your vendor dependencies, then I'd suggest using git submodules.

Here's a sample .gitignore file:

vendor/*
app/bootstrap*
*/logs/*
*/cache/*
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top