2013-12-10 47 views
-1

我很初學者在GitHub上,所以我有一個問題很多的努力後:一個style.css的文件這是在github上上傳文件的正確方法嗎?

touch style.css 
git add README 
git remote add origin https://github.com/username/Hello-World.git 
git push origin master 

然後css.file:

要爲EXP創建回購後上傳文件發送到我的github帳戶,但仍然emtpy和把我的CSS代碼在它的github回購頁面點擊style.css和編輯並複製粘貼我所有的CSS代碼。

真的只有這樣嗎?

+0

每當您對文件進行更改並且你想在你的github倉庫中使用它,你必須添加它,然後將其推入.git add styles.css git commit -m「添加樣式」git push origin master''' – Flukey

+1

哦,我的天。 OMFG,更確切地說。 – uvesten

回答

3

git push origin master之前,你需要style.css文件添加到您的本地回購:

git add style.css 

並總結在更改提交了提交信息:

git commit -a -m 'added style.css' 

,然後推您從本地回購更改爲遠程回購:

git push origin master 
相關問題