简体   繁体   English

将github gh-pages合并到master

[英]merging github gh-pages into master

I know this isn't advised and there's a reason they're separated. 我知道这是不建议的,并且它们分开是有原因的。 But to my specific case gh-pages only have 1 page ( index.html ), and I want that 1 page to contain basically every file on master so it can be demonstrable. 但是对于我的具体情况, gh-pages只有一页( index.html ),我希望那一页基本上包含master上的每个文件,以便可以证明。 I was even considering using JSbin until I stumbled upon github pages . 甚至在偶然发现github页面之前,我至都在考虑使用JSbin

So, is there any way to have just the master and still keep user.github.com/project pointing to it? 那么,有什么方法可以只拥有master并仍然使user.github.com/project指向它?

Maybe using symbolic-ref ? 也许使用symbolic-ref

I'm not sure I understand your question; 我不确定我是否理解你的问题; your gh-pages branch already has all the files from the master branch. 您的gh-pages分支已经拥有master分支中的所有文件。 If you're asking how to delete everything except index.html: 如果您要问如何删除除index.html之外的所有内容:

git clone git@github.com:cauerego/jsoneditor.git
cd jsoneditor
git checkout gh-pages
git rm -rf jsoneditor/ jsunit/ test/
git rm LICENSE README try.html
git commit

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM