I have a repo on GitHub. Recently I have discovered GitHub's pages and I want to use them.
I would like to create this new branch and then, when I need to, either commit on master
branch or on gh-pages
branch.
How can I do this? Do I have to create another folder inside my repo?
app, change directory back to the parent folder, setup a "gh-pages" subfolder for your "gh-pages" branch and change directory into it. Clone your "grandmaster" repository into the "gh-pages" folder (this will clone in the "master" branch), checkout the "gh-pages" branch, list the files (should have "index. html" and ".
Under your repository name, click Settings. In the "Code and automation" section of the sidebar, click Pages. To see your published site, under "GitHub Pages", click your site's URL. Note: It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub.
The GitHub.com browser interface allows you to delete (and create) remote branches. To do this, you need to navigate to the main page of the repository in your browser and then click the "# branches" link.
More recent versions of git have an alternative to the git symbolic-ref
method that Chandru explained. This avoids having to use the lower level commands.
git checkout --orphan gh-pages git rm -rf .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With