[wp-trac] [WordPress Trac] #27207: Extend core's .gitignore file

WordPress Trac noreply at wordpress.org
Tue Feb 25 15:51:35 UTC 2014


#27207: Extend core's .gitignore file
------------------------------+-----------------------
 Reporter:  TobiasBg          |      Owner:
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  3.9
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:  has-patch
  Focuses:                    |
------------------------------+-----------------------
 In [25001] for #24976, we added a [http://git-scm.com/docs/gitignore
 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
 * adding
   * all files that are `svn:ignore`d (list from `svn propget svn:ignore -R
 .`)
   * our config files (the versions without `-sample` in the file name)
   * `.htaccess` ([ticket:24976#comment:16 per azaozz's suggestion])
   * `debug.log` (result of `WP_DEBUG_LOG`, but not `svn:ignore`d),
 * removing most of the initial entries from [25001] 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27207>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list