commit - How to undo a 'git push' -


i complete neophyte git if in way possible screw or not know it, assume case :-)

i added changes, did commit, , issued 'git push origin' forgot append branch. git cheerfully pushed work master. tried 'git revert', deleted changes computer.

how work out of master , on computer, , revert master way before?

start on master, , run git pull remote , local in sync.

checkout feature branch, , run git cherry-pick commits want.

checkout master, , run git reset --hard <commit-id> commit wish go to.

then can git push --force on master update remote.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -