Looks simple, I'm reading a lot about but I'm having issues to do it.
git add .
git commit -m "documentation improvements"
git push -u origin master
git push -u origin gh-pages
error: src refspec gh-pages does not match any.
error: failed to push some refs to 'https://github.com/danielfpedro/simple-modal
.git'
What I'm missing?
this documentation might help. ie:
cd ..
git clone https://github.com/danielfpedro/simple-modal.git simple-modal-webpage
cd simple-modal-webpage
git checkout --orphan gh-pages
git rm -rf .
echo "My GitHub Page" > index.html
git add index.html
git commit -a -m "First pages commit"
git push origin gh-pages
After your push to the gh-pages
branch, your Project Page will be available at danielfpedro.github.io/simple-modal
simple-modal-webpage
) and pull the branch gh-pages
in original repo(simple-modal
):cd ..
rm -r simple-modal-webpage
cd simple-modal
git fetch --all
git checkout -b gh-pages origin/gh-pages #New git just use --> git checkout gh-pages
gh-pages
. use it to commit changes for github webpage:git checkout gh-pages
<made changes to documentation>
git add .
git commit -m "documentation improvements"
git push -u origin gh-pages
Have you set up a new "orphan" branch in your repository? If not do this from your repository:
git checkout --orphan gh-pages
And create some content:
echo "Sample" > index.html
git add index.html
git commit -a -m "Sample page"
git push origin gh-pages
Now you should see your page (after some minutes).
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