Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

远程仓库无法备份theme/next主题的问题 #932

Closed
w4lle opened this issue Jun 5, 2016 · 13 comments

Comments

@w4lle
Copy link

@w4lle w4lle commented Jun 5, 2016

Expected behavior (预期行为)

新建分支post用于存放配置文件,预期可以备份theme/next目录下的配置内容

Actual behavior (实际行为)

实际上并没有,这就导致我删除本地的项目之后,无法还原当时的配置文件,还要重新配置?

@djyde

This comment has been minimized.

Copy link
Collaborator

@djyde djyde commented Jun 6, 2016

不是很懂你的意思。。。

@w4lle

This comment has been minimized.

Copy link
Author

@w4lle w4lle commented Jun 6, 2016

qq20160606-0 2x

用github Pages + hexo 搭建的博客,theme/next 没有上传到github仓库,只有这样的修改
qq20160606-1 2x

这就导致我删除了本地仓库后从github拉取项目不能还原我的主题配置。
我应该怎么做才能还原我的主题配置呢?

@djyde

This comment has been minimized.

Copy link
Collaborator

@djyde djyde commented Jun 6, 2016

这个并不是主题的问题

@w4lle

This comment has been minimized.

Copy link
Author

@w4lle w4lle commented Jun 6, 2016

那是什么问题呢?
我现在没办法还原我的主题配置了,该怎么办呢。

@w4lle

This comment has been minimized.

Copy link
Author

@w4lle w4lle commented Jun 6, 2016

另外我看了一下别人用hexo next主题搭建的博客的github仓库,theme/next 都是上面那张图提交状态。
theme/next是个子仓库,但是子仓库并没有跟随主仓库一起push到远程仓库啊。

@djyde

This comment has been minimized.

Copy link
Collaborator

@djyde djyde commented Jun 6, 2016

@w4lle

This comment has been minimized.

Copy link
Author

@w4lle w4lle commented Jun 6, 2016

对,我说的就是这个问题,如果你换电脑或者删除了本地仓库,怎么恢复next文件夹的?

@w4lle w4lle changed the title github上theme/next目录下没有内容 远程仓库无法备份theme/next主题的问题 Jun 6, 2016
@w4lle

This comment has been minimized.

Copy link
Author

@w4lle w4lle commented Jun 6, 2016

就是因为theme/next是个子项目的原因
建议作者增加一条提示,手动增加submodule
不然像我把本地仓库删了,主题又做了很多修改,无法通过远程仓库恢复
再重新配真的挺麻烦的。

@iissnan

This comment has been minimized.

Copy link
Owner

@iissnan iissnan commented Jun 6, 2016

若仅要同步主题配置,可以考虑使用 这种方法;而如果对主题做定制的话,单单使用 submodule 也无法将你的提交同步到远程,这种情况需要使用 fork + submodule。

@w4lle

This comment has been minimized.

Copy link
Author

@w4lle w4lle commented Jun 6, 2016

用的fork + subtree
建议作者在说明文档中更新下怎么同步修改到远程,以免别人再踩坑。

@w4lle w4lle closed this Jun 6, 2016
@tyrionyu

This comment has been minimized.

Copy link

@tyrionyu tyrionyu commented Nov 27, 2017

@w4lle fork + subtree 具体怎么用呀!我是菜鸟不太会用。

@tyrionyu

This comment has been minimized.

Copy link

@tyrionyu tyrionyu commented Nov 27, 2017

@w4lle 如果某天开发者更新了主题,要怎么更新过来。

@xiaobai050

This comment has been minimized.

Copy link

@xiaobai050 xiaobai050 commented Nov 11, 2018

我用临时构建git主题仓库的方式,感觉还好,写了篇分享。
https://zhangnai.xin/2018/11/11/hexo-theme-upgrade/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.