1

I am new to Git and GitHub.

I have created a public repository username/test_files in Github.

On my local machine, I have created a similar folder /users/username/test_files I created a new test.md file and saved it under /test_files on my local machine. I then ran the following:

git init
git remote add origin https://github.com/username/test_files
git add .
git commit -m "New file has been added"
git push origin master

That doesn't push the file to GitHub. I think the sequence of steps is correct. I did a git status after add and commit and it did show that it added the test.md file.

What am I doing wrong?

Free your mind
  • 47
  • 1
  • 1
  • 7
  • I resolved this. Looks like the remote contained work that I did not have locally. So I ran the following git pull https://github.com/username/test_files and then git push origin master. Now the file was pushed to GitHub. Thanks for your help. – Free your mind Jan 15 '15 at 03:40

0 Answers0