Question

Find question related to How to and How do.
5 posts
Question
How to Undo a Commit in Git public
Question 1 min read

How to Undo a Commit in Git

$ git commit -m "Something terribly misguided" # (0: Accidentally commited) $ git reset HEAD~ # (1) [ edit files as necessary ] # (2)…
BugFix
BugFix
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to BugFix.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.