how to revert git commit remote

First, There are serveral revert situation: Local:

# this will detach your HEAD, i.e. leave you with no branch checked out.
git checkout 0d1d7fc32
git checkout -b old-state 0d1d7fc32
# Don't do it if you have uncommitted work you want to keep
git reset --hard 0d1d7fc32

# Alternatively, if there's work to keep:
git stash
git reset --hard 0d1d7fc32
git stash pop
# This saves the modifications, then reapplies that patch after resetting.
# You could get merge conflicts, if you've modified things which were
# changed since the commit you reset to
git add . && git checkout master -f
git add . && git reset --hard HEAD


git push mathnet +dd61ab32^:master
git reset HEAD^ --hard
git push mathnet -f


Categories: ,