github committed files don't show up on

2019-01-26 18:04发布

Newb question:

I add a file to my repo (drag it to my repo folder) then in git bash I "cd" to my repo and "git init", "git add filename", "git commit -m 'committing files'". When I git status it says

$ git status
#on branch master
#your branch is ahead of origin master by 2 commits
#
working directory clean. Nothing to commit.

But they don't show up in my repo when I refresh the page on my github site. Do I have to push them to the site?

标签: github push
2条回答
Summer. ? 凉城
2楼-- · 2019-01-26 18:40

Do I have to push them to the site?

Yes. Commits are to your local repository first. You need to git push origin master for the commits to be on GitHub.

查看更多
走好不送
3楼-- · 2019-01-26 19:04

You need to push the changes out to your remote on github.

You've commited the changes to your local repository - but that doesn't automatically push them out to your remote. Try this:

git push origin master
查看更多
登录 后发表回答