I linked my project with Github 4 months ago and I today deleted my project unintentionally so I reinstall the last commit from Github and open it in Android Studio but when I make any changes I cannot push it to Github as a master branch but if I push it as different branch it is worked, How can I push the changes as the master branch (default)?
Show details in console
12:48:16.974: [Project] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/master:master --set-upstream
error: failed to push some refs to 'https://github.com/.../...'
hint: Updates were rejected because the remote contains work that you do
To https://github.com/.../...
! refs/heads/master:refs/heads/master [rejected] (fetch first)
hint: not have locally. This is usually caused by another repository pushing
Done
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.