Skip to content

Instantly share code, notes, and snippets.

@salcode
Last active February 4, 2018 21:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salcode/9207094 to your computer and use it in GitHub Desktop.
Save salcode/9207094 to your computer and use it in GitHub Desktop.
.gitignore for a WordPress project managed with Siteground git deployment
# ignore all files starting with .
\.*
# include .gitignore (i.e. do NOT ignore)
!.gitignore
# ignore all files that start with ~
~*
# ignore node/grunt dependencies
node_modules/
# ignore local configuration file
wp-config-local.php
# ignore log files
*.log
# Editor files
*.sublime-project
*.sublime-workspace
*.komodoproject
# ignore OS generated files
ehthumbs.db
Thumbs.db
# ignore cache folders
cache
@miguelangeltorresfp
Copy link

Hi, thank you very much for sharing your knowledge.

I'm a newbie trying to set up a workflow having my sites on Siteground.
Is this .gitignore file better than your preferred one - https://gist.github.com/salcode/b515f520d3f8207ecd04 ?

How do you manage to add the .gitignore file after the repo has been created ???

Thanks in advance !!

@wertyoo
Copy link

wertyoo commented Feb 4, 2018

Tips for people using custom gitignores with site ground:
If you don't want to track core files, setup the gitignores to not track wp core files, and then upload it to the directory you plan to use sg-git on. The when you creat the repository in cpanel, sg-git will respect the gitignores, and you have a clean repo .. cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment