how to remove adding files in git code example Example 1: unstage staged files git git reset HEAD file_path Example 2: how to unadd gitr file git reset HEAD myfile.txt