XF 2.1 .gitignore for XF2?

sajal

Active member
Do we have .gitignore available for XF2?

If not, I'm planning to commit following:

Code:
*.php (in root)
*.txt (in root)
vendor
js
styles
src

Also, do I need to commit _data and _output directories in my custom plugins?

Thanks in advance.
 
Is this for an addon, or are you planning on checking the entire XF directory into source control?
 
I have XF under version control just to make it easier to track the differences between versions, which comes in handy for add-on development. My .gitignore is:
Code:
data/
internal_data/
js/swfupload/
js/vendor/
js/videojs/
js/xf/*.min.js
js/xf/*-compiled.js
library/
src/vendor/
styles/fonts/fa/
styles/fonts/videojs/
index.html


For add-ons I typically use:
Code:
_data/
_releases/


YMMV depending on exactly what you're doing and why.
 
Last edited:
For add-ons I ignore the _data, _build and _releases directories. I keep the metadata files - they do actually contain useful information, though they can be a conflict nightmare if loads of people are working on something.
 
I keep the metadata files - they do actually contain useful information, though they can be a conflict nightmare if loads of people are working on something.
I've removed it from my post in the event somebody blindly copies it. In my experience it's been possible to avoid the potential pitfalls of ignoring them by building releases from a canonical installation, but it's definitely something that shouldn't be done without careful consideration.
 
I have XF under version control just to make it easier to track the differences between versions, which comes in handy for add-on development. My .gitignore is:
Code:
data/
internal_data/
js/swfupload/
js/vendor/
js/videojs/
js/xf/*.min.js
js/xf/*-compiled.js
library/
src/vendor/
styles/fonts/fa/
styles/fonts/videojs/
index.html


For add-ons I typically use:
Code:
_data/
_releases/


YMMV depending on exactly what you're doing and why.
@Jeremy P I have noticed you've ignored vendor directories, so I guess it is somthing will be installed by the composer on-the-fly, in that case I can't find composer.json in the root of the XF installation?

Also, you've ignored min/complied versions of js, so that's something we'll need to generate during the build, right?
 
@Jeremy P I have noticed you've ignored vendor directories, so I guess it is somthing will be installed by the composer on-the-fly, in that case I can't find composer.json in the root of the XF installation?
XF actually doesn't distribute their internal composer.json. I just ignore the vendor directories because I only use version control to skim through the internal differences between XF versions.

Also, you've ignored min/complied versions of js, so that's something we'll need to generate during the build, right?
Per the above, for my purposes I only care about the differences in the canonical files and not really the minified or rolled-up files. If you're using version control for a different purpose, you're going to want to use a different set of rules.
 
Back
Top Bottom