2016-01-20 93 views
2
git clone github.com/ubermankapil/Restaurant.git 
cd repository 
git checkout --orphan gh-pages 
git rm -rf . 
echo "My Page" > index.html 
git add index.html 
git commit -a -m "First pages commit" 
git push origin gh-pages 

我跟着上面的步驟(從https://help.github.com/articles/creating-project-pages-manually/了),之後我參觀了庫網址: http://ubermankapil.github.io/Restaurant/在Github上託管一個版本庫網站不工作?

我沒有得到我的網站的實際內容,而這只是顯示「我的頁」。 如何獲取要在該存儲庫url 上顯示的實際內容?

+0

請參閱我的答案的更新,因爲我相信它可以解決您的問題。 – intboolstring

回答

0

echo "My Page" > index.html 此行將我的頁面打印到index.html文件 ,這意味着您的index.html文件將只包含單詞我的頁面。

bash中的運算符是將輸出重定向到給定的文件中。 Github頁面基於readme.md文件而不是index.html。 使用降價更新您的readme.md。

0

在快速查看您的回購之後,似乎所有這些都沒有必要。

這是你應該做的。

git clone github.com/ubermankapil/Restaurant.git 
cd repository 
git checkout gh-pages 
git pull 

這會給你從gh-pages分支的所有代碼。您遵循的說明適用於從頭開始的人員。


如果您已經運行了git commit,那麼您需要重置。到您的原產地

git reset --hard origin/gh-pages 
+0

它仍然無法正常工作。同樣,它在屏幕上顯示「我的頁面」。 –

+0

你把我的網頁後git提交? – intboolstring

相關問題