I tried all duplicated questions, but none of them worked. Please can you write correct syntax respectively for me?
I tried respectively:
git add .
git commit -m "comment"
git remote add origin https://github.com/dgknca/DogukanCavus_H5180005-MuhammetFurkanAydogdu_H5180045
git push -u origin master
push -f
works, but I don't want use it. Because it's deleting all previous commits.
This is my error:
sezginc@dgknca MINGW64 ~/desktop/DogukanCavus_H5180005-MuhammetFurkanAydogdu_H5180045-master (master)
$ git push -u origin master
To https://github.com/dgknca/DogukanCavus_H5180005-MuhammetFurkanAydogdu_H5180045
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/dgknca/DogukanCavus_H5180005-MuhammetFurkanAydogdu_H5180045'
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.