Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As mentioned, there's lots of information out there for people who are using console-based Git software. However, I could not find a single piece of info on how to do this solely through Github Windows. Well, here is the solution:</p> <p>Process:</p> <ul> <li><p>Create a project page, as described here: <a href="https://help.github.com/articles/creating-pages-with-the-automatic-generator" rel="nofollow noreferrer">https://help.github.com/articles/creating-pages-with-the-automatic-generator</a></p></li> <li><p>Unfortunately, they only have console-based solution for getting a local copy. So here's how the rest of this works in Github Windows... (assumption: project name is <code>myproject</code>, consisting of myproject.js and myproject.css)</p></li> <li><p>After the page has been created (takes a few minutes), open up Github Windows.</p></li> <li><p>In Github Windows, open the repository for the project. On the top menubar it has "in sync", "master", "tools". Click on "master" and switch to "gh-pages" branch - <a href="https://stackoverflow.com/questions/11021346/how-to-use-branches-in-github-for-windows">SO example</a>.</p></li> <li><p>When you do this, the folder <code>C:\Users\YourName\Documents\GitHub\myproject</code> will now display the files for the "gh-pages" branch. If you click "master", in Github Windows, it will change the folder structure to once again represent the "master" branch. <em>This is what confused me earlier, you can't see the directory structure for both branches at the same time.</em></p></li> <li><p>Select the "master" branch in Github Windows.</p></li> <li><p>In Windows Explorer, copy myproject.js and myproject.css into a separate directory (e.g., <code>c:\temp</code>).</p></li> <li><p>Go back to Github Windows and select the "gh-pages" branch.</p></li> <li><p>Go back to Windows Explorer and cut the files you put into <code>c:\temp</code> and paste them into a directory like <code>C:\Users\YourName\Documents\GitHub\myproject\myproject-1.0\</code></p></li> <li><p>Go back to Github Windows, and you'll see "2 files to be commited". Type in your commit message and click 'Commit'.</p></li> <li><p>Then click 'Sync'.</p></li> <li><p>You can now include these files in your webpages, using a URL like: <code>http://yourname.github.io/myproject/myproject-1.0/myproject.js</code></p></li> </ul> <p>Obviously this is a <strong>huge</strong> pain in the ass to do it this way, if you expect to be updating the source file(s) regularly. So obviously an automated approach would be most ideal. There is an answer for this on SO <a href="https://stackoverflow.com/questions/7180099/including-js-from-raw-github-com?lq=1">here</a>, unfortunately it involves UNIX-based scripting which I have zero knowledge of (and, truthfully, no interest in learning just for this). If anyone comes up with a more efficient way of doing this, <em>using only the GUI-based tools</em>, I'm sure myself and many others would be interested in hearing about it.</p> <p><strong>EDIT:</strong> This solution is obviously usurping Github's intended way of doing things, as when I click on the "gh-pages" branch on the github website it tells me that it's "5 commits ahead and 11 commits behind" the master branch, even though they have the same files. So, again, if anyone else has a better <em>GUI-based</em> solution to this problem, I'm all ears.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload