Cannot push commit to github :

Posted on

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

git push -f origin master

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
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s