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