看起来很简单,我正在阅读很多,但我有问题要做.
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'
我错过了什么?
这个文档可能有帮助.即:
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
推送到gh-pages
分支机构后,您的项目页面将在danielfpedro.github.io/simple-modal
simple-modal-webpage
)并gh-pages
在原始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
.用它来为github网页提交更改:git checkout gh-pagesgit add . git commit -m "documentation improvements" git push -u origin gh-pages