2015-10-07 44 views
1

我是新來webdeveloping之類的東西,我想我的HTML和CSS文件推送到github上,但我做git commitgit push origin master後,我得到這個錯誤:Git的推問題

fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

很抱歉,如果這是一個愚蠢問題,但我是新的,我無法在網上找到答案。我查看了幾個教程,並沒有成功將我的頁面推送到GitHub。我已經設法使用本教程更新我的README.md文件:http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository

+0

請檢查下面給出的答案,謝謝。 –

回答

1

GitHub documentation,您需要將您origin配置爲指向GitHub的遠程:

git remote add origin https://github.com/user/repo.git 
# Set a new remote 

git remote -v 
# Verify new remote 

更換https://github.com/user/repo.git的實際路徑到GitHub上的遠程存儲庫。