Last active
February 4, 2018 21:27
-
-
Save salcode/9207094 to your computer and use it in GitHub Desktop.
.gitignore for a WordPress project managed with Siteground git deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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
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 !!