i was trying to push a git local folder to github repository. while doing so, first i have used ‘https’ to add origin to the url of the git repository and was tring to push origin master. but encountered with following error :
! [rejected] master -> master (fetch first)
error: failed to push some refs to ‘https://github.com/<githubaccount>/<>repo_name.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.
… but when tried with ‘http’ to add origin, it works…
not sure, why ‘https’ didn’t work.
Thanks with Regards,