I'm doing something wrong with Git and GitHub Pages

Hi,

I’ve been using Middleman with GitHub Pages for a couple of years now but my deploy process has always been convoluted.

Fair warning: I’m someone who does a little programming when needed so I’m pretty weak with Ruby and Git.

I currently have my .git files in the build folder. When I do a new build, I need to move my .git files out of the folder and then re-add them after otherwise I have to re-connect the folder with GitHub which is an even bigger pain.

I tried ignoring the .git files in my config.rb but that doesn’t seem to help.

ignore '.git'

I think Middleman is designed to upload the entire project (source and build) and then point the server to the build folder as the root but GitHub doesn’t seem to let us do that (or it does it automatically for Jekyll).

Please let me know if I’m missing something, obvious or otherwise, that will make my build process less fragile.

Thanks.