Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git branch: gh-pages

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?

like image 699
rubik Avatar asked Jan 20 '11 17:01

rubik


People also ask

How do I branch GH-pages?

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 ".

Where is that GH-pages in GitHub?

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.

Can I delete GH-pages branch?

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.


1 Answers

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 . 
like image 63
Arrowmaster Avatar answered Sep 28 '22 20:09

Arrowmaster