Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Octopress和github混淆_Git_Octopress - Fatal编程技术网

Octopress和github混淆

Octopress和github混淆,git,octopress,Git,Octopress,我是Octopress的新手,对git/github也相对陌生 我在本地克隆了()Octopress回购协议: git clone git://github.com/imathis/octopress.git sitename cd sitename bundle install rake install 酷-所以现在我有了Octopress的源代码和本地驱动器上的一个骨架站点 问题1-更新 根据,我应该能够通过以下方式更新最新的Octopress更改: git pull octopress

我是Octopress的新手,对git/github也相对陌生

我在本地克隆了()Octopress回购协议:

git clone git://github.com/imathis/octopress.git sitename
cd sitename
bundle install
rake install
酷-所以现在我有了Octopress的源代码和本地驱动器上的一个骨架站点

问题1-更新 根据,我应该能够通过以下方式更新最新的Octopress更改:

git pull octopress master     # Get the latest Octopress
bundle install                # Keep gems updated
rake update_source            # update the template's source
rake update_style             # update the template's style
但这会导致一个错误:

[sitename]$ git pull octopress master
fatal: 'octopress' does not appear to be a git repository
fatal: Could not read from remote repository.
为什么会失败

问题2“我的”东西住在哪里?
现在我需要为我创建的资产创建我自己的github回购协议,对吗?如果是这样的话,我是把所有的东西都存储在那里,还是只存储我博客特有的东西(帖子、页面等)?我的猜测是,我必须在github创建一个复制,并将我的更改推送到那里。。。但是,我不确定这是否正确。如果您有任何建议,我们将不胜感激。

您的回购协议中应该有一个名为
octopress
的遥控器来执行此操作:

[sitename]$ git pull octopress master
尝试添加一个名为
octopress
的遥控器,并将其指向:


octopress文档在某些地方有点松散。它描述了在使用github页面作为部署时使octopress远程:


这些信息(我认为)应该提前添加,因为大多数人可能希望在自己的远程repo中维护自己的博客,名为
origin

,以回答问题2:

Octopress存储库有两个分支,源和主。源分支包含用于生成博客的文件,主分支包含博客本身(您的帖子等)

最初根据配置本地文件夹时,主分支存储在名为“\u deploy”的子文件夹中。由于文件夹名称以下划线开头,因此当您
git push origin source
时,它将被忽略。相反,当您
rake deploy
时,主分支(包含您的博客帖子)会得到更新


您可能会发现有帮助。

git-pull-octopress-master
中,该octopress是否也应该被sitename替换,就像在安装中一样?“git-remote-add-octopress”添加了遥控器,因此现在“git-pull-octopress-master”似乎可以工作了。想知道为什么这不是Octopress安装/安装的一部分?
git remote add octopress github.com/imathis/octopress.git