Rhys
Rhys

Reputation: 489

Using Jekyll with Git effectively

I'm interested to see how other people tackle this.

Firstly, we are only using Jekyll for the templating design, the actual site is built in Angular.

So we want to source control everything except the Jekyll build files (_site).

That's if we change the include/header.html, we don't get every page that includes the header coming up in source control. It makes the commits pretty messy. We could also only select the files that are not _site and do that in a separate commit like build files, but once the project gets big it's hard to find the file you changed.

However, we do eventually want to show the devs the _site folder to see how everything looks.

We could chuck it up on a server or something but just wondering if there is anyway to do it in git?

Thanks guys.

Upvotes: 1

Views: 301

Answers (1)

tjoels
tjoels

Reputation: 38

So we want to source control everything except the Jekyll build files (_site).

If you want to ignore the _site folder, add it to a file in the root directory with the name .gitignore. An example .gitignore file could contain these lines:

_site/
.sass-cache/
Gemfile.lock

Upvotes: 2

Related Questions