Remove Changes from a Commit Before Pushing

Chris Achard
InstructorChris Achard

Share this video with your friends

Send Tweet

If we've already committed changes that we don't want to push, we can also remove those with git reset, but we're going to reset back to a specific commit, either with:

git reset HEAD~1


git reset [HASH]

and that will effectively "undo" the commits before that hash.

Then we can add and commit only the changes that we want.