.gitignore for SugarCRM

15 ignore rules for SugarCRM, ready to copy into your repository.

Customer relationship management

The complete .gitignore for SugarCRM

# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:33:03 UTC
# Technologies: SugarCRM

### SugarCRM ###
/.htaccess
/cache/*
!/cache/index.html
/custom/history/
/custom/modulebuilder/
/custom/working/
/custom/modules/*/Ext/
/custom/application/Ext/
/config.php
/config_override.php
/silentUpgrade*.php
# Log file
*.log
/upload/*
!/upload/index.html
/upload_backup/

What these SugarCRM rules actually ignore

Every pattern below, and why it belongs in your .gitignore.

Ignore custom .htaccess stuff.

Pattern What it ignores
/.htaccess Ignore custom .htaccess stuff.
/cache/* Ignore the cache directory completely. This will break the current behaviour. Which was often leading to the misuse of the repository as backup replacement. For development the cache directory can be safely ignored and therefore it is ignored.
!/cache/index.html Ignore custom .htaccess stuff.

Ignore some files and directories from the custom directory.

Pattern What it ignores
/custom/history/ Ignore some files and directories from the custom directory.
/custom/modulebuilder/ Ignore some files and directories from the custom directory.
/custom/working/ Ignore some files and directories from the custom directory.
/custom/modules/*/Ext/ Ignore some files and directories from the custom directory.
/custom/application/Ext/ Ignore some files and directories from the custom directory.

Custom configuration should also be ignored.

Pattern What it ignores
/config.php Custom configuration should also be ignored.
/config_override.php Custom configuration should also be ignored.

The silent upgrade scripts aren't needed.

Pattern What it ignores
/silentUpgrade*.php The silent upgrade scripts aren't needed.

Logs files can safely be ignored.

Pattern What it ignores
*.log Log file

Ignore the new upload directories.

Pattern What it ignores
/upload/* Ignore the new upload directories.
!/upload/index.html Ignore the new upload directories.
/upload_backup/ Ignore the new upload directories.

How to use this .gitignore for SugarCRM

  1. Copy the SugarCRM rules above, or download the file directly.
  2. Create a file named .gitignore at the root of your Git repository and paste the rules into it.
  3. If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
  4. Commit the .gitignore so everyone on the team shares the same rules.