0

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?

Stefan
  • 109,145
  • 14
  • 143
  • 218
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
  • I'll update that there's basically no reason to do this. It turns out unzipping the current install.zip for piwik on top of your old installation is generally perfect. And `wget` takes about as much typing `git pull` – Mittenchops Aug 07 '12 at 23:30

1 Answers1

3

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.

Stefan
  • 109,145
  • 14
  • 143
  • 218
  • When I enter `git clone git://github.com/piwik/piwik.git` I get the error `fatal: destination path 'piwik' already exists and is not an empty directory.` – Mittenchops Jun 01 '12 at 14:44
  • The destination directory must be empty. Rename either your existing installation or the directory you want to clone into. – Stefan Jun 01 '12 at 14:47
  • I see. I'm looking for a way to do this on top of my existing installation. – Mittenchops Jun 01 '12 at 14:51
  • Well, you could clone the repository into a new directory and copy the existing installation files into it. Then `git status` will show you which files have been changed. – Stefan Jun 01 '12 at 14:57
  • All of my piwik links point to the current folder. Renaming or moving it is not an option. – Mittenchops Jun 01 '12 at 14:59
  • You have to set up the git repository in a different directory. If everything works, you can switch both directories. – Stefan Jun 01 '12 at 15:08
  • On an AWS beanstalk application, the config/config.ini.php file needs to be committed then untracked via `git update-index --assume-unchanged config/config.ini.php` – ccagle8 Feb 28 '13 at 20:50