I was working on my project and pushed it successfully to the GitHub. Everything was going smoothly, that somehow I messed in the project and I deleted the local version and went to GitHub and download the whole project using the download
icon.
After working on the project and making handful of changes, when I tried to push it to the original it showed me the following error.
To https://gitlab.rz.uni-bamberg.de/abc/def/bla.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://gitlab.rz.uni-bamberg.de/abc/def/bla.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I followed the following sequence after some research which showed me the above error.
git init
git add .
git commit -m "changes"
git remote add origin https://gitlab.rz.uni-bamberg.de/abc/def/bla.git
git push -u origin master
Please help me out how can I upload this one now.