Git

If you use Git for version control of software projects, it makes sense to exclude certain files and folders from being transferred (e.g. configuration files, temporary files such as session or cache files, and log files).

To do this, simply create a text file called .gitignore in the root directory of the Git project (at the same level as the .git folder). In this file, add the elements you want to exclude, one per line (e.g. var/ or app/etc/local.xml for Magento installations). Don't forget to commit this change as well (git commit .gitignore) to apply the desired effect immediately.