Using Git as a content manager system

Not familiar with git? Start with an online book or Version Control with Git.

Git is an open sourced source control software system. It allows coders to manage large projects remotely and on their own machine. Each contributor will hold their own version of the code on their machine and can manipulate that however they wish. Eventually, they can push back their contributions to a remote repository.

This workflow design can also be great for managing content, although that content does have to be in text format - git will allow binary files to be uploaded and managed, but doesn’t allow for differences between files to be shown - this can only be done with plain text files.

Git manages differences in a project by creating branches. However, you do not need to create a branch for each new set of content. For example, if you write a new article, you do not need a new branch for this. Within Jekyll, you create a _drafts folder and then put your content in there.

Add the new file to your git repository.

git add _drafts/your-new-post.md

Commit the post:

git commit -am"new post added"

To share with multiple authors, set up a remote repository and push to remove:

git push origin master

When other contributors/authors start their work, they will pull down the latest changes. They could start work on your contribution if they wished, or they could start their own article.

Obviously, this is a small article and cannot go in to the full details of how git works. Other documentation for git exists - Version Control with Git.