Extend core's .gitignore file
|Reported by:||TobiasBg||Owned by:||markjaquith|
In  for #24976, we added a gitignore file to trunk. With the recent additions of the git mirrors for the SVN repo, this is becoming more and more useful.
However, the .gitignore file is out of sync with the svn:ignore property in many places (also noted in some comments in #24976).
It also uses entries in a "greedy" way (regexp speak) (for example, build will match a build folder in any subdirectory, and not just the ./build directory).
Additionally, it contains exclusions for some folders and file types that don't appear in core natively.
I therefore propose to clean up and extend the .gitignore file to include all files/folders in core that have a meaning and might appear throughout core development, but that should not be version-controlled/tracked.
The attached patch does that by
- all files that are svn:ignored (list from svn propget svn:ignore -R .)
- our config files (the versions without -sample in the file name)
- .htaccess (per azaozz's suggestion)
- debug.log (result of WP_DEBUG_LOG, but not svn:ignored),
- removing most of the initial entries from  as ignoring those file types should be done on a per-developer basis (e.g. by adding them to .git/info/exclude), if desired, but not on the core repo by default,
- being more strict with folder and file names, by prepending the / before the entries. (With that, /build matches only ./build, but not for example ./src/wp-admin/build if it existed (in untracked state)). (I left out the / for the config files, to be on the safe side by really ignoring all of them.)
Additionally, I added a .gitignore entry, to allow developers to ignore other/custom stuff with further .gitignore files, e.g. in subfolders.
Change History (26)
3 years ago
- Owner set to markjaquith
- Resolution set to fixed
- Status changed from new to closed