how to remove a file that was added in git code example Example 1: git remove added file to commint git reset file-name Example 2: undo add stage git git reset <file>