If I commit to a branch but I realize I don't want that commit anymore, can I erase it?

Once I finish the Intro to GitHub course, I will start using GitHub in my daily workflow.  What happens if I don’t want the commit anymore? 

1 Like

This is a great question! Git provides a helpful command called “git reset” that allows you to remove changes that were committed into history back to the early stages of work. There are several options when using “git reset” so depending on which option of reset you choose will give you a different outcome. This Git command can be destructive so be cautious when using it. 

Here is a helpful videoblog post, and oneline book to help you get started learning more. 

3 Likes