uncommit a file git code example Example 1: how to uncommit in git git reset --soft HEAD^ Example 2: git remove added file to commint git reset file-name