git cancel add file code example
Example 1: git untrack file
git rm --cached filename
Example 2: git undo add
// undo add for one file
git reset <file>
// undo add for all files
git reset
Example 3: git only add modified files
git add --all
git rm --cached filename
// undo add for one file
git reset <file>
// undo add for all files
git reset
git add --all