Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 1
    Doesn't work: remote: error: denying non-fast-forward refs/heads/master (you should pull first)
    – m0skit0
    Commented Jan 16, 2015 at 10:37
  • @m0skit0 as the message say's you should pull first :) Commented Mar 16, 2015 at 19:50
  • The answer to this is at stackoverflow.com/a/10544328/1019307 - git config receive.denynonfastforwards false but actually I set that manually in my local git repository I have in /opt/git that I created to play with the ideas here. I'm not sure how or if can do this for bitbucket, github etc... And @intuitivepixel that is pointless as it reverse what you were trying to achieve with the hard reset.
    – HankCa
    Commented Jul 18, 2015 at 13:30
  • Hi @jkovacs, I don't want new changes in master to be removed. I just want to push that commit hash "e3f1e37" to origin master. Is it possible by skipping the 2nd command git reset --hard "e3f1e37"?
    – KarenAnne
    Commented Aug 17, 2015 at 3:34
  • Hi @jkovacs, I just confirmed that I can skip the 2nd step. :)
    – KarenAnne
    Commented Aug 17, 2015 at 3:45