Oh crap, I committed to master!
Sometimes when I'm not fully caffeinated or just in a careless rush I will make code changes and commit them to master.
This is a pretty easy problem to resolve using the reflog git maintains for you.
git branch oops
git reflog
#note the reflog id prior to where you made your commit(s)
git reset --hard :reflogid
git checkout oops
git push origin oops
Written by Mark Allen
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Reflog
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#