Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

github committed files don't show up on

Tags:

github

push

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?

like image 234
dark.penrose Avatar asked Dec 27 '22 06:12

dark.penrose


2 Answers

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.

like image 66
vcsjones Avatar answered Jan 05 '23 18:01

vcsjones


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
like image 34
acoffman Avatar answered Jan 05 '23 18:01

acoffman