Question: I hope the problem is clear. Is there an alternative way not to get undefined reference error without implementing template functions in header files? Thanks in advance.

Answer: 
Gollum (https://github.com/github/gollum) is a Git-powered wiki written by GitHub in Sinatra. You can both push and pull from command line or use the included web interface to edit content.

Unfortunately it seems like GitHub have some what abandon development/maintenance of it, so it has some rough edges. It's also very basic, so it does not include features such as authentication[1].

I'm gonna use Gollum with gollum-site (https://github.com/dreverri/gollum-site), a static file generator for Gollum, and just use Gollum as the admin backend.

1: A basic solution to authentication can be found at <https://github.com/github/gollum/issues/107#issuecomment-2608061>

---

There is also Regulate, <https://github.com/quickleft/regulate>:

> 
> Rails 3 engine that provides a Git backed CMS that allows for an admin to define editable regions in a page view.
> 
> 
>
For what reason do you want to keep your content into a git repository? What exactly is the problem that makes you hate databases so much? A DBMS is built for fast data reads and writes, whereas git is built for change management. This is an architectural choice with which you might shoot yourself in the foot.

If the problem lies in users that overwrite entries, then you should rather introduce functionality to archive previous versions (or the diff's of them) not overwrite them. For example the rails\_admin gem does that

And even with immediate committing you will not escape the problem that one user opens an entry for editing and keeps it for an hour until he saves it, where at the same time another user does a quick edit in 5 minutes. Here you need to send from the client which revision has he been editing and in the case of conflict, show an interface where the user can compare his revisions with the ones made by the other user. Or if you're advanced then you can do it the google-docs way. enable simultaneous editing.