# Github and Jekyll advice please

**URL:** <https://talk.jekyllrb.com/t/github-and-jekyll-advice-please/289>\
**Category:** Help\
**Created:** [March 10, 2017, 3:20am UTC](https://talk.jekyllrb.com/t/github-and-jekyll-advice-please/289 "2017-03-10T03:20:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Subkelvin](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Subkelvin](https://talk.jekyllrb.com/u/Subkelvin)\
**Post date:** [March 10, 2017, 3:20am UTC](https://talk.jekyllrb.com/t/github-and-jekyll-advice-please/289/1 "2017-03-10T03:20:34Z")

</div>

I’m new to Jekyll and using Github to host my site. I’ve finally figured out how get everything setup with the Git software and using the Minimal Mistakes theme. However, there appears to be two ways of doing this and I’d like some advice please.

So, as I understand it, I’ve currently uploaded the whole MM theme to Github and now one by one I upload my pages in md format, where Github does all the processing work and spits out html. Everything seems to work fine.

But, I’ve now read that you can supposedly run your own Jekyll instance locally, have it build your site from your local md files, and then upload the results (though admittedly, I’m having a rough time figuring this concept out, as when I install Jekyll it merely serves the pages locally and doesn’t seem to create an actual html repository for me).

Is there a preference as to which approach works better around here?

Any advice is greatly appreciated!

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 10, 2017, 4:09am UTC](https://talk.jekyllrb.com/t/github-and-jekyll-advice-please/289/2 "2017-03-10T04:09:57Z")

</div>

I would think _most_ sites are built locally to preview and then the code is committed to GH and then GH builds the site - if you are using GH for hosting.

It is just quicker and easier to build things locally if you are changing things.

You can also either commit the source, or the actual \_site. Again I would say most people commit the source rather than the \_site folder, unless they are using plugins that GH doesn’t like and they want to use the GH hosting.

Jekyll itself has nothing to do with GH or Git (other than it was created by GH more or less). I personally mostly use HG/Mercurial for my version control and keep it on BitBucket rather than GH.

So for me, I have my source on my computer, when I want to add a page or edit something, I do it locally, fire up jekyll to build it, and once I like it, I commit to BitBucket - which is my code repository. Since I am not using GH hosting, I also use a thing called S3\_Website to publish the contents of the \_site directory to AWS S3 where it is hosted.

There are many ways to use Jekyll, combining it with GH and GH hosting is one of many.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 10, 2017, 4:18am UTC](https://talk.jekyllrb.com/t/github-and-jekyll-advice-please/289/3 "2017-03-10T04:18:14Z")

</div>

If you already have a repo on GH, you should clone that locally, and then use it - then you commit the changes, and then push the files to GH, then GH will build the site and host it.

I made a video a while back that may help you, though it is not quite on topic to your question, but it deals with local code being committed to GH. The bit about the GH-pages branch I think is out of date - I don’t think it matters which branch you are in.

Git is confusing to say the least, but the basics are simple enough once you do it a few times, I am not very good at it, mostly made this video for myself so i could remember how to do it.

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [March 10, 2017, 6:22am UTC](https://talk.jekyllrb.com/t/github-and-jekyll-advice-please/289/4 "2017-03-10T06:22:37Z")

</div>

For a beginner, the current method that you’re following is the _easiest_.

Simply create a markdown file, preview it locally, commit and push to GH when satisfied with the preview.

The other method is rather outdated and I would not recommend it unless you need to use a third-party plugin in addition to the official plugins used by the theme.

One additional advice would be to commit related multiple files within a single commit, or learn to employ the pull request feature to push multiple commits of related files as a single merge commit to your _master_ branch.  
This is to avoid unnecessary build cycles for each small change (e.g. correcting typos)

A

---

<div class="post-metadata">

**Author:** ![Subkelvin](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Subkelvin](https://talk.jekyllrb.com/u/Subkelvin)\
**Post date:** [March 11, 2017, 7:11pm UTC](https://talk.jekyllrb.com/t/github-and-jekyll-advice-please/289/5 "2017-03-11T19:11:32Z")

</div>

Thanks for the advice. Looks like I’m doing it the way it was meant to be done.
