- at the root of the Symfony2 project create a file named .gitignore, this file will contain entries to be ignored by git
- add to the .gitignore the following entries:
- /web/bundles/
- /app/bootstrap*
- /app/cache/*
- /app/logs/*
- /vendor/
- /app/config/parameters.ini
- initialize the git repository:
$ git init
- add all the project files but the ones in the .gitignore file
$ git add .
- create an initial commit
$ git commit -m "initial commit"
- To publish the project to GitHub, follow the official tutorial