github - How do I undo a git reset --hard origin/bejing -


i working on project. accidentally added file shouldn't have local git repo (very large copy of db). github rejected pushes github because file size large.

so needed remove commits , go was. did following, huge mistake.

git reset --hard origin/bejing 

i shouldn't have reset origin/bejing, rather reset bejing. or revert last commit of bejing.

now when try commit error.

    https://github.com/blah/myapi.git        40eeeb5..418805e  bejing -> bejing     git@heroku.com:blah-staging.git      ! [rejected]        bejing -> master (non-fast-forward)     error: failed push refs 'git@heroku.com:blah-staging.git'     prevent losing history, non-fast-forward updates rejected     merge remote changes before pushing again.  see 'note     fast-forwards' section of 'git push --help' details. 

how fix this? mean want go had yesterday working. not quite sure git reset --hard origin/bejing did.

i not sure why error trying push master branch? master has not received updates in 2 years? why of sudden trying push bejing master (bejing -> master)?


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -