how to remove the file that is added code example Example 1: git remove added file to commint git reset file-name Example 2: how to unadd gitr file git reset HEAD myfile.txt