我在Github上发布时如何备份octopress

时间:2013-08-14 01:51:40

标签: octopress

我昨天开了自己的章鱼, 我们的博客文章存储在源文件夹/ 但是当我运行rake deploy时,它只将公共数据推送到github服务器。 因为默认的.gitignore如下

  1
  2 .bundle
  3 .DS_Store
  4 .sass-cache
  5 .gist-cache
  6 .pygments-cache
  7 _deploy
  8 public
  9 sass.old
 10 source.old
 11 source/_stash
 12 source/stylesheets/screen.css
 13 vendor
 14 node_modules

有没有更好的方法将源标记文件放在GitHub服务器中,以避免我意外删除源代码。

由于

2 个答案:

答案 0 :(得分:0)

我没有看到gitignore文件有什么问题。也许你的问题出在你的git分支上。

试试这个$ git branch如果它说master你必须将分支重命名为源代码如下:

$ git branch -m master source

然后当你再次$ git branch时,应该说source

部署时你应该git add,git commit然后$git push origin source然后rake deploy

让我知道这是否有效

答案 1 :(得分:0)

rake deploy会将_deploy文件夹中的更改推送到master分支。

rake deploy之后,如果您在git push origin source文件夹下~/octopress,则您的帖子将被推送到您的回购的源分支。