remove added files in git code example Example 1: how to unadd gitr file git reset HEAD myfile.txt Example 2: undo add stage git git reset <file>