git undo stage code example Example 1: unstage staged files git git reset HEAD file_path Example 2: undo add stage git git reset <file>