Search code examples
gitgithubmatomo

Switch piwik installation to git


This is mostly a git settings question.

I have a piwik installation in-place that I've been updating manually from zip files. (My host isn't supportive of the automatic update feature, and manual updates are getting tiresome.)

I'd like to switch my installation over to a git update from here: https://github.com/piwik/piwik

...that I can just use to git pull new piwik updates.

Can someone walk me through how I would do that? Specifically, how I git clone the repo and ignore my current config folder, so I don't have to back that up every time I pull new updates?


Solution

  • Clone the repository with

    git clone git://github.com/piwik/piwik.git <directory>
    

    where <directory> is the directory to clone into (defaults to piwik when omitted).

    To make git ignore your custom config file, just add this line to the repo's .gitignore file:

    config/config.ini.php
    

    Since the piwik repo doesn't include that file (just a config.ini.sample.php), it's not going to be overwritten when pulling updates.

    If you are going to make changes to piwik's source, either create a new branch or fork the repo.