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?
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With