Skip to content

GitHub Pages Root #63631

Answered by MayaAtwan
codeadamca asked this question in Pages
Aug 13, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I found this solution and I hope it works,
Instructions for setting up username.github.com *
Create a repo named username.github.com
Push a master branch to GitHub and enjoy!
Instructions for setting up username.github.com/repo-name *
Caution: make your working directory clean before you do this (either stash or commit), otherwise this will lose any changes you've made to your project since the last commit.
cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
git add .
git commit -a -m "First pages commit"
git push origin gh-pages

https://gist.github.com/atomize/2012391

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@codeadamca
Comment options

Answer selected by codeadamca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pages Host a static website, right from your repo Question
2 participants