Git & Gantry - How?

Hi,

I’m working on a project with my partner. So I decided to use git for versioning and deploying the site on the server.

Does anybody have an example for me how to configure git right for grav and gantry?

Kind Regards,

Michael Gollmer

Really you can do it anyway you like, but you can push the whole user/ folder into git. You might want to add a few things to .gitignore like accounts/ if you don’t want that info in a public repo.

Also you can check out the git-sync plugin: https://github.com/trilbymedia/grav-plugin-git-sync which automates the process but primarily focuses on the user/pages folder.

BTW Gantry is also just file-based and sits primarily in the user/plugins folder, so would just be included with the Grav repo.

Hey Andy,

thanks for replying. We build up a repo with two local dev installations - one at on my dev pc and one on the pc of my partner.

First we tried just to vesion the user/ folder. It doesn’t work very well ;). After installing various plugins and committing them to the repo, my partner tried to pull and got a lot of errors. :wink: So we startet just to version ALL of our grav folder.

Not it works! A little bit unstable, because gantry seems to write files even if you don’t change anything, but it’s ok.

Kind regards,
Michael Gollmer

It’s really just a matter of putting stuff that commonly conflicts into a .gitignore file. Obviously your going to have issues with cache folders, or anything that is autogenerated, so make sure those are ignored and not pushed into the repo.

Hi,

thank you for your advice. I’ll bear it in my mind. :wink: