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
Become a member
to unlock all features

Level Up!

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


    Remove Files from Staging Before Committing


    If you've added files to the staging area (the Index) accidentally - you can remove them using git reset.

    We'll first add a file to staging, but then back it out with:

    git reset HEAD filename

    in order to pull it back to the working directory, so it doesn't end up in a commit when we don't want it to.