Home
/
SiteGround Git Tool Tutorial
/
SiteGround Git Tool Files Exclude List

SiteGround Git Tool Files Exclude List

To optimize the repository creation through the SiteGround Git Tool we have automatically excluded some types of files that are highly unlikely to be needed when you want to make changes to your website using git. For example, there is no need to download a 2GB video file to your computer via Git. Such files can be downloaded and uploaded much more efficiently via an FTP client.

Files that the SiteGround Git Tool excludes by default

Below you can find a list of all file types excluded by default by the SiteGround Git Tool:

  • Archive files: ace bin car bz bz2 gz gzip lbs md pae pak rar tar tgz wad zip arj jar cab bak jar sea 7z zip.* tgbk jpa dat sitx ssr xdb vhd rfa bkz svb nba qpb ptb alz gpg sql
  • Documents: ai pdf doc docx xls xlsx ppt pxl odt sxw stw xyz csv tst rvt dwf nwd mdt
  • Disk image files (iso): iso nrg ccd img sub bin cue dat gho ghs gbp bkf mds mdf vmdk pvm tib
  • Audio and video files: drw divx flv psb avi mp2 mp3 mp4 mpg mpeg nef jmy mov ram rm rmvb rpm swf vob wav wma wmv mid midi mpa rmf wave flac m2v ogg ogm tga indd eps bsp nav dwg sid aif mxf m4v mkv cr2 mts r3d stl m4a m2p mod ts asf m2ts dpx

To see which files have been excluded from your specific repository, go to your Site Tools > Devs > Git. Under Manage Repositories, go to the Action menu for the preferred one and click on Git Info:

At the bottom of the pop-up you will see the list of excluded file folders that applies to your specific repository.

Below, you can find a list of all the application related files/folders that we exclude when we create the repositories:

Joomla! 3.x

DOCUMENT_ROOT/cache/*
DOCUMENT_ROOT/tmp/*
DOCUMENT_ROOT/logs/*
DOCUMENT_ROOT/administrator/cache/*
DOCUMENT_ROOT/t3-assets/*
DOCUMENT_ROOT/t3assets/*

WordPress

DOCUMENT_ROOT/wp-content/upgrade/*
DOCUMENT_ROOT/wp-content/backup-db/*
DOCUMENT_ROOT/wp-content/cache/*
DOCUMENT_ROOT/wp-content/cache/supercache/*
DOCUMENT_ROOT/wp-content/w3tc-cache/*

Magento

DOCUMENT_ROOT/var/cache/*
DOCUMENT_ROOT/var/session/*
DOCUMENT_ROOT/var/log/*
DOCUMENT_ROOT/var/report/*

PrestaShop

DOCUMENT_ROOT/cache/smarty/compile/*
DOCUMENT_ROOT/cache/smarty/cache/*
DOCUMENT_ROOT/img/tmp/*

Drupal

DOCUMENT_ROOT/tmp/*

Once the repository is created the above-mentioned files and folders will be removed from it. This means that when you clone the repository, the Joomla! 3.x cache related files will not be downloaded to your computer.

Exclude additional files from your local Git repository

You can also create local GIT ignore lists to remove additional files from the local repositories on your end. If you have a class of files that you don’t want Git to automatically add or even show you as being untracked you can create .gitignore files. These are generally automatically generated files such as log files or files produced by your build system. In such cases, you can create a file listing patterns to match them named .gitignore. Here is an example file:

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

The file should be placed in the root folder of the Git repository.

To apply the .gitignore rules to the already tracked files, clear the Git index cache with the following command in the root folder of the repository:

git rm -r --cached .

Then add back all files, while taking into account the .gitignore list, with:

git add .

Share This Article