git push -f origin master
Cannot push commit to github :
Error:
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.
hint: Updates were rejected because the remote contains work that you do
FIX
Notes:
forcing an update isn’t ideal but all the commits were on my local machine and I am the only one with access to the repository. Possible the error occurred due to network issue earlier? Else I would git pull, and then go through the diffs