Last active
November 17, 2024 10:42
-
-
Save glueckpress/083857bd541cb9232f94c58d2fe4bacc to your computer and use it in GitHub Desktop.
[git] Exclude .gitignore and all of WordPress, except specified directories
This file contains 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
# Sample of .git/info/exclude | |
# Documentation: https://git-scm.com/docs/gitignore | |
# Exclude .gitignore file. | |
# If an initial .gitignore file has been added to the repo, | |
# you might have to delete it first and sync the change. | |
# Then create a new one which will be excluded according to this rule. | |
.gitignore | |
# Exclude all of WordPress, but keep these directories synced: | |
# /wp-content/mu-plugins | |
# /wp-content/themes/child-theme | |
# Exclude everything in root… | |
/* | |
# … except wp-content. | |
!/wp-content | |
# Now exclude everything in wp-content … | |
/wp-content/* | |
# … except mu-plugins … | |
!/wp-content/mu-plugins | |
# … and except themes. | |
!/wp-content/themes | |
# Now exclude everything in themes … | |
/wp-content/themes/* | |
# … except child theme. | |
!/wp-content/themes/child-theme |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment