Newb问题:
我将一个文件添加到我的仓库(将其拖到我的仓库文件夹中)然后在git bash中我“cd”到我的仓库和“git init”,“git add filename”,“git commit -m'提交文件' ”。当我git status它说
$ git status
#on branch master
#your branch is ahead of origin master by 2 commits
#
working directory clean. Nothing to commit.
但是当我刷新github网站上的页面时,它们并没有显示在我的仓库中。我是否必须将他们推到网站上?
答案 0 :(得分:7)
我是否必须将他们推送到网站?
是。首先提交到本地存储库。您需要git push origin master
提交GitHub上的提交。
答案 1 :(得分:2)
您需要将更改推送到github上的遥控器。
您已将更改提交到本地存储库 - 但这并不会自动将它们推送到您的远程存储库。试试这个:
git push origin master