unstage file from git add code example Example 1: git unstage file for commit git reset myfilename.txt Example 2: undo add stage git git reset <file>