I am a newbie and trying to using Gitbash to push a code to github. When I use the command
git init
it shows me the error
Reinitialized existing Git repository in C:/User/User/Desktop/xxx.git
Then, when I use the command
git add .
it is ok
when I use the command
git commit -m "First commit"
it shows me this error
On branch master Your branch is ahead of 'origin/master' by 1 commits
Nothing to commit, working tree clean
And final, when I try to use those command
git remote add origin https://github.com/xxx/xxx.git
git push origin master
It told me that error: failed to push some refs to https://github.com/xxx/xxx.git
I am very confusing because of this error, could you please help me ? Thank you very much.