What does git reset do

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the git category.

Last Updated: 2021-05-15

What does reset do, in a nutshell?

It moves current branch to another position, optionally updating staging and the working directory. With no arguments, git reset brings all files back to HEAD, keeping them as they are in the working directory. Basically this just unstages everything.