Creating GitHub Pages Repo

username.github.com/repo-name

Username .github.com / repo-name * username instructions

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

I did this: cd / path / to / repo-name
After I did git clean -fdx , all my files were deleted. I had to download them from github.

Was this ( cd / path / to / repo-name ) intended to work in the new directory?

+1
source share
1 answer

The commands you see are designed to create an empty branch gh-pages .

, , , , github. , , , , . wiki- gh-pages. , , , , , - http://pages.github.com/

git checkout --orphan gh-pages .

. : Git?

+3

All Articles