Remove remote commit in git -


i can't find working solution problem:

how remove commit in local , in remote repository. here 1 solution. when try can go reset command in local repository. can't push it. error message says: remote: error: denying non-fast-forward refs/heads/master (you should pull first) after pull master points again commit want remove.

can help?

edit - try:

$ git reset --hard head^1 head @ 1c50f9c commit  $ git push -f total 0 (delta 0), reused 0 (delta 0) remote: error: denying non-fast-forward refs/heads/master (you should pull first) e:/reps/gf.git  ! [remote rejected] master -> master (non-fast-forward) error: failed push refs 'e:/reps/gf.git' 

your remote repository has setup disallows non-fast-forward pushes on server side. have 2 options:

  1. contact server administrators, explain case, , ask them (temporarily) rescind no-fast-forward-push policy, git config receive.denynonfastforwards. (you still need -f flag push.)

  2. use git revert instead of git reset, , push resulting commit. both commit , inverse visible, cannot avoided. unless original commit contains sensitive data, should big deal—git commits reverted time. if original commit contain sensitive data, see option 1.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -