My previous step was
git remote set-url origin https://github.com/MilenkoM/ex1microhydra.git
git remote -v
shows
origin https://github.com/MilenkoM/ex1microhydra.git (fetch)
origin https://github.com/MilenkoM/ex1microhydra.git (push)
If I go for
git push origin master
then I got error
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/MilenkoM/ex1microhydra.git'
Why? Git log shows
commit 0e9a31ff7c1fb1d0bb56e8ad5a359f92666be6a9 (HEAD -> mybranch)
Date: Wed Dec 18 17:12:21 2019 +0100
Changes to be committed:
new file: index.js
new file: package.json
I followed the advice from Loi and eftshift,and tried this
git checkout master
Switched to branch 'master'
It doesn't work either
git push origin mybranch:master
Says
To https://github.com/MilenkoM/ex1microhydra.git
! [rejected] mybranch -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/MilenkoM/ex1microhydra.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I am new to git,what are these fast-forwards?
git show-ref
8ef0e288bb2ab7c42ebc37b018fcb08a73073c2e refs/heads/master
0e9a31ff7c1fb1d0bb56e8ad5a359f92666be6a9 refs/heads/mybranch
097e48b3fd8f87f90f19872fc788ea2f0bb433cc refs/remotes/origin/master
I should go for pull,but pull what?