I have a repository on GitHub that has two branches, namely master and gh-pages. The master branch is basically a static website, but I use GitHub pages to have a project page with a "demo" button that lets the user see what the interface looks like. The project is a LightDM greeter theme, which can be run in the browser as well as by LightDM's Webkit greeter.
Only gh-pages can serve the HTML to the browser normally, but I keep all my work on the master branch.
My file structure is like this:
.
├── theme (master)
|   ├── index.html
|   └── ...
└── website (gh-pages)
    ├── demo -> contents of ../theme/
    ├── index.html
    └── ...
I tried symlinking demo to theme, as the two must contain the exact same contents, but Git responds with this error:
Project/website [ git commit -a "Made some changes"
fatal: 'demo/' is beyond a symbolic link
Next, I made hooks that synced the contents of theme and demo whenever I made a commit on either of the branches, but this method seems unnaturally complicated.
I'm basically trying to keep theme and demo linked to one another. Is there a clean way of doing this using Git?
 
    
 
    