git i add want to revert code example Example 1: revert git add git reset <file> or git reset Example 2: undo add stage git git reset <file>