Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Remove Changes from a Commit Before Pushing

    gitgit

    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

    or

    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.