我已阅读指南,其中告诉你执行以下操作:
- 创建一个 .github.com 存储库
- 将其检出到
path/to/repo
- cd /path/to/repo
- 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
master
”分支在本地,但没有“gh-pages
”。按照上述步骤3-6进行操作会使该分支中没有任何文件。如何将“master
”中的文件放入将发布到GitHub的分支中?
我尝试过 git checkout master && git push origin gh-pages
,但是结果是:error: src refspec gh-pages does not match any.
fatal: The remote end hung up unexpectedly
error: failed to push to 'git@github.com:<me>/<me>.github.com.git'