unstage single file gir code example Example 1: git unstage file for commit git reset myfilename.txt Example 2: unstage staged files git git reset HEAD file_path